Skip to content

Instantly share code, notes, and snippets.

@ouyi
ouyi / german_umlaut_unicode.txt
Created May 30, 2019 19:47
German umlaut unicode
Char Unicode
---------------
Ä \u00c4
ä \u00e4
Ö \u00d6
ö \u00f6
Ü \u00dc
ü \u00fc
ß \u00df
@ouyi
ouyi / raspberrypi_install_syncthing.sh
Created May 24, 2020 14:23
raspberrypi_install_syncthing.sh
# https://apt.syncthing.net/
# Add the release PGP keys:
curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
# Add the "stable" channel to your APT sources:
echo "deb https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
sudo apt-get update
@ouyi
ouyi / raspberrypi_install_AdGuardHome.sh
Created May 24, 2020 14:26
raspberrypi_install_AdGuardHome.sh
# https://github.com/AdguardTeam/AdGuardHome/wiki/Raspberry-Pi
cd $HOME
wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_arm.tar.gz
tar xvf AdGuardHome_linux_arm.tar.gz
cd AdGuardHome
sudo ./AdGuardHome -s install
@ouyi
ouyi / pi_temperatures.sh
Created June 16, 2020 20:28
Bash script for displaying the CPU and GPU temperatures of Raspberry Pi 3B+
#!/usr/bin/env bash
# Display the CPU and GPU temperatures of Raspberry Pi 3B+
set -e
cpu_temp=$(</sys/class/thermal/thermal_zone0/temp)
cpu_temp=$(printf %.1f $((10 * cpu_temp/1000))e-1)
gpu_temp=$(vcgencmd measure_temp)
@ouyi
ouyi / auto_scroll.js
Created November 23, 2020 20:41
Automatically scroll page up and down in JavaScript
setInterval(() => { window.scrollTo(0, document.body.scrollHeight); window.scrollTo(0, 0); }, 60000)