Skip to content

Instantly share code, notes, and snippets.

View patchedsoul's full-sized avatar

patchedsoul

  • planet earth
View GitHub Profile
@patchedsoul
patchedsoul / alpine-install.sh
Created December 20, 2019 17:31 — forked from thde/alpine-install.sh
A script to install alpine linux on a dedicated server. Tested on Hetzner, Kimsufi / OVH
#!/bin/sh
set -ex
PATH=/bin:/sbin:/usr/bin:/usr/sbin
KEYMAP="us us"
HOST=alpine
USER=anon
ROOT_FS=ext4
BOOT_FS=ext4
@patchedsoul
patchedsoul / generate-ssh-key.sh
Created October 2, 2019 19:21 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
Starting point is last version of Crankshaft (NG Alpha-5 2019-06-08).
1. Activate DEV mode in Crankshaft. See this guide: https://github.com/opencardev/crankshaft/wiki/Dev-Mode-and-Debug-Mode
2. Attach Ethernet cable to Raspberry/Crankshaft, boot, find out IP and login through SSH (user: pi; pwd: raspberry).
3. Install some packages:
$ sudo apt-get update
$ sudo apt-get install -y libboost-all-dev libusb-1.0.0-dev libssl-dev cmake libprotobuf-dev protobuf-c-compiler protobuf-compiler
$ sudo apt-get install -y libqt5multimedia5 libqt5multimedia5-plugins libqt5multimediawidgets5 qtmultimedia5-dev libqt5bluetooth5 libqt5bluetooth5-bin qtconnectivity5-dev pulseaudio librtaudio-dev librtaudio5a
@patchedsoul
patchedsoul / goes16-rtlsdr.md
Created July 30, 2019 11:19 — forked from lxe/goes16-rtlsdr.md
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
hadashboard:
dash_url: "http://xxxxxxxxxxxxxxx"
dashboard_dir: /conf/dashboards
rss_feeds:
- feed: "http://rss.slashdot.org/Slashdot/slashdot"
target: rss.tech
rss_update: 300
import cv2
from time import sleep, time
import sys
import curses
from curses import wrapper
x = 160
sx = 4
@patchedsoul
patchedsoul / route53.py
Created September 20, 2018 21:39 — forked from rmarchei/route53.py
route53 hook for dehydrated - python2 / python3 + boto2 version. Tested on Ubuntu 16.04
#!/usr/bin/env python
# How to use:
#
# Ubuntu 16.04: apt install -y python-boto OR apt install -y python3-boto
#
# Specify the default profile on aws/boto profile files or use the optional AWS_PROFILE env var:
# AWS_PROFILE=example ./dehydrated -c -d example.com -t dns-01 -k /etc/dehydrated/hooks/route53.py
#
# Manually specify hosted zone:
@patchedsoul
patchedsoul / 0migrator.md
Created June 27, 2018 12:12 — forked from OttoWinter/0migrator.md
Lovelace Migration Script

Home Assistant Lovelace Migrator

Do you want to try out this experimental (!) new lovelace UI stuff in Home Assistant but don't want to migrate your entire configuration? This script is here to help! It reads in your Home Assistant configuration (specifically the group: section) and creates a matching ui-lovelace.yaml file in your Home Assistant configuration folder (of course backing up any previous file at that path).

To use this script, you first need to have python and home assistant installed where you plan to run this script. Do so using virtual environments and the pip3 install -U homeassistant command. Then copy below file to lovelace_migrate.py (any location should work) and run:

python3 lovelace_migrate.py -c <PATH_TO_HASS_CONFIG_DIR>
@patchedsoul
patchedsoul / compile_python.sh
Last active June 25, 2018 16:34
Compile Python with SSL and ZLIB support
##############################################################
## Compile python 3.6.5 locally for development work ##
##############################################################
## Download, Untar, and Configure python source
cd /home/$USER/src
wget http://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar -zxvf Python-3.6.5.tgz
cd Python-3.6.5
# if any missing deps or failure during compliation,
@patchedsoul
patchedsoul / docker-compose.yml
Created March 28, 2018 00:32 — forked from plajjan/docker-compose.yml
NIPAP docker compose
nipap-db:
image: nipap/postgres-ip4r
volumes:
- ./db-data:/var/lib/postgresql/data
environment:
- PGDATA=/var/lib/postgres/data/pgdata
- POSTGRES_USER=nipap
- POSTGRES_PASSWORD=S3cretDBPas5
- POSTGRES_DB=nipap