Skip to content

Instantly share code, notes, and snippets.

View ferdinandkeller's full-sized avatar
🇯🇵
おはようございます

Ferdinand Keller ferdinandkeller

🇯🇵
おはようございます
View GitHub Profile
#!/bin/bash
# define installation folder
dest_folder="$HOME/.local/bin"
echo "golang will be installed at $dest_folder"
# get the current architecture
arch=$(dpkg --print-architecture)
echo "targeting $arch architecture"
@ferdinandkeller
ferdinandkeller / install_zellij.sh
Last active April 15, 2024 15:48
Script to install Zellij on Debian/Ubuntu without snap packages.
#!/usr/bin/env bash
# derived from official installation script: https://zellij.dev/launch
dir="/usr/local/bin"
if [[ -x "$dir/zellij" ]]
then
"$dir/zellij" "$@"
exit
#!/bin/bash
# rhel-only stuff
function rhel_setup () {
# we install EPEL and CRB
sudo dnf install -y epel-release
sudo dnf config-manager --set-enabled crb
# we install the packages needed to build the latest nvim version (for ubuntu)
sudo dnf -y install ninja-build cmake gcc make unzip gettext curl
@ferdinandkeller
ferdinandkeller / update.sh
Last active February 12, 2024 21:48
Bash script to automatically and smartly update PaperMC whenever a new version is available. You need to install `jq` and `wget`.
#!/bin/bash
# set a target minecraft major version
target_mc_version=1.19
# retrieve the latest minecraft minor version
latest_mc_version=$(curl "https://api.papermc.io/v2/projects/paper" | jq -r '[.versions[] | select(. | test("^'$target_mc_version'"))] | last')
# retrieve the matching latest paper version
latest_paper_version=$(curl "https://api.papermc.io/v2/projects/paper/versions/${latest_mc_version}" | jq -r '[.builds[]] | last')