Skip to content

Instantly share code, notes, and snippets.

View DJSundog's full-sized avatar

DJ Sundog DJSundog

View GitHub Profile
@DJSundog
DJSundog / main.cpp
Created February 3, 2021 23:59
now playing in the toot-lab on an M5Paper
#include <M5EPD.h>
#include <WiFi.h>
#include <WiFiClientSecure.h>
#include <ArduinoJson.h>
#include <Regexp.h>
#include <MD5Builder.h>
M5EPD_Canvas canvas(&M5.EPD);
WiFiClientSecure client;
@DJSundog
DJSundog / autorotate_screen.bash
Created September 10, 2020 21:40
A simple bash script for handling screen autorotation on a Pinephone running X
#!/bin/bash
# a hacky simple bash script to handle autorotation of the screen (and pointer) on a
# Pinephone running X
#
# screen with autorotate based on accelerometer values as long as this script is running
#
# Uncomment the next line to get debugging output when running this script
#DEBUG=1
STATE_UNKNOWN=0
@DJSundog
DJSundog / help.txt
Last active August 20, 2019 18:12
glitch-soc flavored mastodon tootctl help text v2.9.2+glitch
RAILS_ENV=production bin/tootctl version
2.9.2+glitch
Commands:
tootctl accounts SUBCOMMAND ...ARGS # Manage accounts
tootctl cache SUBCOMMAND ...ARGS # Manage cache
tootctl domains SUBCOMMAND ...ARGS # Manage account domains
tootctl emoji SUBCOMMAND ...ARGS # Manage custom emoji
tootctl feeds SUBCOMMAND ...ARGS # Manage feeds
tootctl help [COMMAND] # Describe available commands or one specific command
@DJSundog
DJSundog / firewall-rules
Created May 22, 2018 20:26
iptables script for banning bad IPs
#!/bin/bash
IPTABLES=/sbin/iptables
BLACKLIST=/etc/blacklist.ips
echo " * flushing old rules"
${IPTABLES} --flush
${IPTABLES} --delete-chain
${IPTABLES} --table nat --flush
${IPTABLES} --table nat --delete-chain
Verifying my Blockstack ID is secured with the address 1HijUMu99dGoGpZxMynfqXeCoCGMer3p49 https://explorer.blockstack.org/address/1HijUMu99dGoGpZxMynfqXeCoCGMer3p49

Keybase proof

I hereby claim:

  • I am djsundog on github.
  • I am djsundog (https://keybase.io/djsundog) on keybase.
  • I have a public key ASBAtosYMqaGS9cVy-AMR1QPNG3BpnlsJ5FXBTiE1n6eXwo

To claim this, I am signing this object: