Skip to content

Instantly share code, notes, and snippets.

@kleo
kleo / btrfs-guide.md
Created May 23, 2022 17:37 — forked from MaxXor/btrfs-guide.md
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@kleo
kleo / nginx.conf
Created June 20, 2019 17:14 — forked from spikegrobstein/nginx.conf
nginx config for proxying requests for plex over a hostname-based virtualhost.
upstream plex-upstream {
# change plex-server.example.com:32400 to the hostname:port of your plex server.
# this can be "localhost:32400", for instance, if Plex is running on the same server as nginx.
server plex-server.example.com:32400;
}
server {
listen 80;
# server names for this server.
@kleo
kleo / autossh.service
Last active June 24, 2019 13:59 — forked from thomasfr/autossh.service
serveo.net systemd service for autossh
# serveo.net systemd service for autossh
# Modify username to your username
# Connect to ssh server
# ssh -J serveo.net username@alias
[Unit]
Description=autossh service
After=network.target
[Service]
@kleo
kleo / 000-default.conf
Created November 5, 2018 03:43 — forked from deardooley/000-default.conf
Sample Apache virtual host to proxy subdomain to docker container
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www
ServerName docker.example.com
ErrorLog logs/docker.example.com_error.log
CustomLog logs/docker.example.com_access.log combined
ProxyPreserveHost On
ProxyRequests off
<Location />
@kleo
kleo / install.md
Last active February 7, 2021 15:28 — forked from rsandrade/install_go_pi.sh
Install Go 1.15.3 on Raspberry Pi

Install Go 1.15.3 on Raspberry Pi

  1. yeet this into your terminal
sh -c "$(curl -fsSL https://gist.githubusercontent.com/kbeflo/9d981573aad107da6fa7ac0603259b3b/raw/35111746659e6146d4985e0ab451c023415f5f1b/install.sh)"
  1. logout
  2. login
@kleo
kleo / gist:aeec984687cae882f4739f1563c06c58
Created July 24, 2018 07:25 — forked from Manu343726/gist:ca0ceb224ea789415387
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
@kleo
kleo / Pi3_as_WiFi_AP_Bridge.md
Created April 22, 2018 08:18 — forked from umardx/Pi3_as_WiFi_AP_Bridge.md
Using a Raspberry Pi 3 as a Wifi access point and bridge

The specificity of my setup, is that the Raspberry won’t be a router but a bridge. DHCP is thus delegated to the main ADSL router and all devices connected to the AP will appear on the same network than other devices. The instructions below are based on a fresh Raspbian lite install so that it can be reproduced easily.

Install the required packages :

$ sudo apt-get install -y bridge-utils hostapd

To create a bridge, we need to enable ip_forward in the kernel, for that, edit /etc/sysctl.conf and remove comment (#) from the following line :

@kleo
kleo / wav-mp3
Created April 19, 2018 14:19 — forked from championofblocks/wav-mp3
Command line bash to convert all wav to mp3
for i in *.wav; do lame -b 320 -h "${i}" "${i%.wav}.mp3"; done
@kleo
kleo / Screen Shot 2018-02-27 at 11.44.36 PM.png
Created March 4, 2018 02:46 — forked from fducloux/Screen Shot 2018-02-27 at 11.44.36 PM.png
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings Web Interface
Screen Shot 2018-02-27 at 11.44.36 PM.png
@kleo
kleo / wget.bat
Last active August 10, 2017 01:31 — forked from parzonka/call-wget-example.bat
wget for windows cmd (credits: https://superuser.com/a/536400/)
cscript /nologo wget.js http://example.com