Skip to content

Instantly share code, notes, and snippets.

View AnotherDroog's full-sized avatar
📠
decreasing local entropy

Another Droog AnotherDroog

📠
decreasing local entropy
  • Chiang Mai
View GitHub Profile
@AnotherDroog
AnotherDroog / chroot_cache.sh
Created May 24, 2019 16:38
Create cache file within alpine chroot
#!/bin/sh
WORLD=/etc/apk/world
ALPINE_RELEASE=3.9.4
echo "Running make_cache"
echo "alpine-base" > ${WORLD}
echo "avahi" >> ${WORLD}
echo "dbus" >> ${WORLD}
@AnotherDroog
AnotherDroog / set_ports.sh
Created January 6, 2019 08:13
lnd upnp script
#!/bin/sh
LN_PORT=9739
INVOICER_PORT=1666
ROUTER_UPNP=http://192.168.0.1:1900/gatedesc.xml
IP="$(ip route get 1 | awk '{print $NF;exit}')"
SSH_PORT="22$(echo ${IP} | cut -d '.' -f4)"
# ssh
@AnotherDroog
AnotherDroog / temp.sh
Created December 29, 2018 08:10
Raspberry Pi temperature on alpine
#!/bin/sh
cpu=$(cat /sys/class/thermal/thermal_zone0/temp)
echo "$((cpu/1000))C"
@AnotherDroog
AnotherDroog / lnd.service
Created December 29, 2018 06:12
lnd unlock script
[Unit]
Description=LND Lightning Daemon
Requires=bitcoind.service
After=bitcoind.service
[Service]
ExecStart=/usr/local/bin/lnd
ExecStartPost=+/etc/lnd/unlock
User=ln
Group=ln