Skip to content

Instantly share code, notes, and snippets.

@kleo
kleo / pve-sata-mount
Last active November 8, 2020 16:13
proxmox mount external drive
# https://forum.proxmox.com/threads/mount-disk-with-data-ext4-to-the-virtual-machine.48302/
/etc/pve/qemu-server/101.conf
scsi1: /dev/sde
# not required to include partition number (/dev/sde1)
# /dev/sde1 partition persists on mount
@kleo
kleo / proxypass-with-headers
Last active June 27, 2020 16:46
docker proxypass ssl
server {
listen 80;
server_name example.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name example.com;
# remove comment if not using letsencrypt e.g self signed certificates
# ssl_certificate /etc/ssl/private/example/example.com.crt;
python -c "import pty;pty.spawn('/bin/bash')"
python3 -c "import pty;pty.spawn('/bin/bash')"
@kleo
kleo / kismet.service
Last active November 8, 2020 16:13
raspberry pi kismet systemd
[Unit]
Description=Kismet
ConditionPathExists=/usr/bin/kismet
After=network.target auditd.service
[Service]
User=root
Group=root
Type=simple
ExecStart=/usr/bin/kismet --no-ncurses
@kleo
kleo / gpsd
Created November 17, 2018 14:51
Raspberry Pi gpsd setup
sudo apt install gpsd
/etc/default/gpsd
DEVICES="/dev/ttyUSB0"
@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 [email protected]
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 / .tmux.conf
Last active November 8, 2020 16:11
Kleo tmux.conf
# Kleo .tmux.conf
# Install tmux plugin manager
# https://github.com/tmux-plugins/tpm
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-cpu'
@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