This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
HOSTNAME=${HOSTNAME:-$(hostname 2>/dev/null || echo 'local')} | |
# logging functions | |
log() { echo -n "[$(date +'%Y-%d-%m %H:%M:%S')] $HOSTNAME.$1"; } | |
debug() { echo -ne '\033[90m' >&2; log "DEBUG: $1" >&2; echo -e '\033[0m' >&2; } | |
info() { echo -ne '\033[34m' >&2; log "INFO: $1" >&2; echo -e '\033[0m' >&2; } | |
warn() { echo -ne '\033[33m' >&2; log "WARN: $1" >&2; echo -e '\033[0m' >&2; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const words = [ | |
'cigar', 'rebut', 'sissy', 'humph', 'awake', 'blush', 'focal', 'evade', | |
'naval', 'serve', 'heath', 'dwarf', 'model', 'karma', 'stink', 'grade', | |
'quiet', 'bench', 'abate', 'feign', 'major', 'death', 'fresh', 'crust', | |
'stool', 'colon', 'abase', 'marry', 'react', 'batty', 'pride', 'floss', | |
'helix', 'croak', 'staff', 'paper', 'unfed', 'whelp', 'trawl', 'outdo', | |
'adobe', 'crazy', 'sower', 'repay', 'digit', 'crate', 'cluck', 'spike', | |
'mimic', 'pound', 'maxim', 'linen', 'unmet', 'flesh', 'booby', 'forth', | |
'first', 'stand', 'belly', 'ivory', 'seedy', 'print', 'yearn', 'drain', | |
'bribe', 'stout', 'panel', 'crass', 'flume', 'offal', 'agree', 'error', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
youtube-dl -f best --write-sub --convert-subs srt --embed-subs --sub-lang en "$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
dc_bios_path="/home/pi/RetroPie/BIOS/dc" | |
if [[ ! -d "$dc_bios_path" ]]; then | |
mkdir -p "$dc_bios_path" | |
fi | |
boot_rom_url="https://raw.githubusercontent.com/archtaurus/RetroPieBIOS/master/BIOS/dc_boot.bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700,500,300); | |
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700,500,300); | |
@keyframes a { | |
0% { | |
transform: rotate(0deg) | |
} | |
to { | |
transform: rotate(1turn) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
wget -O /tmp/build-duckstation.sh \ | |
https://gist.githubusercontent.com/andrewmackrodt/ac8fac8a8ceb24510d22ef341f8eb58f/raw/build-duckstation.sh | |
chmod +x /tmp/build-duckstation.sh | |
docker run --rm -it --privileged \ | |
-e "APPIMAGE_BUILD_DIR=/build" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
export DEBIAN_FRONTEND=noninteractive | |
apt update -qq | |
apt install -qqy g++ git libfuse2 wget \ | |
cmake ninja-build ccache libsdl2-dev libgtk-3-dev \ | |
qtbase5-dev qtbase5-dev-tools qtbase5-private-dev qt5-default qttools5-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!./node_modules/.bin/ts-node-dev | |
/** | |
* Based on https://askubuntu.com/a/1267328/170380 | |
*/ | |
import { exec } from 'child_process' | |
import dbus from 'dbus-next' | |
const sessionBus = dbus.sessionBus() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo iptables -F | |
sudo iptables -X | |
sudo iptables -t nat -F | |
sudo iptables -t nat -X | |
sudo iptables -t mangle -F | |
sudo iptables -t mangle -X | |
sudo iptables -P INPUT ACCEPT | |
sudo iptables -P FORWARD ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gsettings reset org.gnome.desktop.interface text-scaling-factor | |
gsettings reset org.gnome.desktop.interface cursor-size | |
gsettings reset com.ubuntu.user-interface scale-factor | |
gsettings reset org.gnome.settings-daemon.plugins.xsettings overrides |