Skip to content

Instantly share code, notes, and snippets.

View ryanteck's full-sized avatar
😁

Ryan Walmsley ryanteck

😁
View GitHub Profile
@EvelynSubarrow
EvelynSubarrow / vitavideogen.py
Created August 10, 2020 12:03
Vita video generator, ffmpeg/py37+
#!/usr/bin/env python3
import glob, os, os.path, argparse
parser = argparse.ArgumentParser()
parser.add_argument('fileglob')
args = parser.parse_args()
@mvadu
mvadu / upnpPortMapper.sh
Created March 30, 2019 02:13
THis script uses upnp client (upnpc) to talk to router and open ports
#!/bin/bash
#~/bin/upnpPortMapper.sh
#sudo apt-get install miniupnpc
#crontab -l | grep upnp || echo $(crontab -l ; echo '*/5 * * * * ~/bin/upnpPortMapper.sh >/dev/null 2>&1') | crontab -
export LC_ALL=C
router=$(ip r | grep default | cut -d " " -f 3)
gateway=$(upnpc -l | grep "desc: http://$router:[0-9]*/rootDesc.xml" | cut -d " " -f 3)
ip=$(upnpc -l | grep "Local LAN ip address" | cut -d: -f2)
@mosquito
mosquito / README.md
Last active July 24, 2024 14:40
Add doker-compose as a systemd unit

Docker compose as a systemd unit

Create file /etc/systemd/system/docker-compose@.service. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin, you should use paths specific for your environment.

[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
@thomasmacpherson
thomasmacpherson / drwho.py
Last active December 29, 2015 08:29
PiFace Control And Display Doctor Who anniversary message.
import pifacecad
cad = pifacecad.PiFaceCAD()
cad.lcd.backlight_on()
# the bit map for the 4 characters that make up the tardis, in hex
tardis0 = pifacecad.LCDBitmap([0x1, 0x7, 0xF, 0xF, 0x9, 0x9, 0x9, 0xF])
tardis1 = pifacecad.LCDBitmap([0x10, 0x1c, 0x1e, 0x1e, 0x12, 0x12, 0x12, 0x1e])
tardis2 = pifacecad.LCDBitmap([0xf, 0x9, 0x9, 0x9, 0xf, 0xf, 0xf, 0x1f])
tardis3 = pifacecad.LCDBitmap([0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1f])