Skip to content

Snippets

A collection of hints and code snippets that I collected.

Gitea repository description

Applies to Gitea and Forgejo installations e.g. codeberg.org and (partly1) the GitNex companion app for android.

The following html tags are confirmed to be parsed by Gitea and Forgejo when used in the descriptions of repositories:

  • <a> anchor
  • <b> bold
  • <br> line break
  • <i> italic

Markdown is as of writing not being parsed.

Android SDK setup

environment: linux bash

Meant to be used for a quick setup of a linux dev environment for Tiny Weather Forecast Germany (TWFG).

sudo apt -y install openjdk-8-jdk-headless
wget "https://dl.google.com/android/repository/commandlinetools-linux-7583922_latest.zip"
mkdir -p Android/Sdk
unzip "commandlinetools-linux-7583922_latest.zip" -d Android/Sdk

export ANDROID_HOME=$(pwd)/Android/Sdk/cmdline-tools
export PATH="$ANDROID_HOME/bin:$ANDROID_HOME/lib:$ANDROID_HOME/emulator:$ANDROID_HOME/patcher:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$PATH"

yes | sdkmanager --update --sdk_root=${ANDROID_HOME}
sdkmanager --list --sdk_root=${ANDROID_HOME} | grep "build-tools"
yes | sdkmanager "build-tools;29.0.3" "platforms;android-29" "sources;android-29" --sdk_root=${ANDROID_HOME}
yes | sdkmanager --licenses --sdk_root=${ANDROID_HOME}
sudo apt -y install gradle

code search using dezip.org

To search the contents of code repositories using archives containing their source code.

update the cached tar archive

  1. remove cached contents GET request: https://www.dezip.org/https://codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz?remove

  2. update contents GET request: https://www.dezip.org/https://codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz

  3. please be patient. The page will reload when dezip completed the extraction of the archive's contents.

warning

Please use the update function responsible and if possible not more than once per day. This services operates on a fair use policy with limited bandwith. Please don't make the creator turning it into a paid service with captchas, geoblocking, etc. by wasting bandwidth. Also see here for more information .

note

This update workflow is executed regularly by an external cron job. So in general a manual update should not be required.

search cached repository contents

Visit https://www.dezip.org/v1/9/https/codeberg.org/Starfish/TinyWeatherForecastGermany/archive/master.tar.gz/tinyweatherforecastgermany/ using your browser of choice to search the contents.

Type F to search and K or J to change between search results.

teddit dev setup

sudo apt install -y ffmpeg redis-server
docker run -d --name redis-stack -p 6379:6379 -p 8001:8001 redis/redis-stack:latest
npm install
npm run start

setup Elixir on Ubuntu focal

# source: https://gist.github.com/tgroshon/6bcd5b5f5ef6052e1190ca3ec1a378e7

# Install the Erlang Solutions apt key
wget https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc
sudo apt-key add erlang_solutions.asc

sudo echo 'deb https://packages.erlang-solutions.com/ubuntu focal contrib' | sudo tee /etc/apt/sources.list.d/erlang-solutions.list
sudo apt update
sudo apt install esl-erlang elixir
# for SASS builds
sudo apt install -y rsync
sudo apt install -y inotify-tools
sudo apt install -y sassc

  1. Not yet supported in list views only in repository details screen. 


Last update: November 19, 2023 13:44:00
Created: March 12, 2022 21:43:00