Skip to content

Instantly share code, notes, and snippets.

View stickperson's full-sized avatar

Joe Meissler stickperson

  • Synthego
  • San Francisco, CA
View GitHub Profile
# correct colors
set -g default-terminal "screen-256color"
# allow mouse scrolling. Hold option to temporarily disable.
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
bind -n WheelDownPane select-pane -t= \; send-keys -M
# Set prefix to control+a
set -g prefix C-a
@stickperson
stickperson / timer.py
Created August 31, 2020 03:25
basic timer
class Timer:
def __init__(self, delay, fn):
self.delay = delay
self.fn = fn
self.last_updated = datetime.datetime.now()
def tick(self):
now = datetime.datetime.now()
diff = now - self.last_updated
milliseconds = (diff.days * 24 * 60 * 60 + diff.seconds) * 1000 + diff.microseconds / 1000.0
2019-10-27T00:00:45.943624+00:00 app[web.1]: 10.9.213.124 - - [27/Oct/2019:00:00:45 +0000] "POST /install/runCommand HTTP/1.1" 200 135 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKi
t/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
2019-10-27T00:00:46.048552+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Will now run commands. Request index is 28
2019-10-27T00:00:46.048757+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Current command is "migrate", index is 0
2019-10-27T00:00:46.048888+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Will not execute.
2019-10-27T00:00:46.049101+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Current command is "firefly-iii:decrypt-all", index is 1
2019-10-27T00:00:46.049228+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Will not execute.
2019-10-27T00:00:46.049464+00:00 app[web.1]: [2019-10-27 00:00:46] heroku.DEBUG: Current command is "firefly-iii:restore-oauth-keys", index is 2
2019-10-27T00:00:46.049598+00:00 a
@stickperson
stickperson / gist:502f75168cce47afec103c270917015c
Created October 27, 2019 19:17
Logs for heroku db restore
=== Backup r007
Database: BACKUP
Started at: 2019-10-27 19:14:10 +0000
Finished at: 2019-10-27 19:14:19 +0000
Status: Failed
Type: Manual
Backup Size: 287.91KB (0% compression)
=== Backup Logs
2019-10-27 19:14:11 +0000 pg_restore: connecting to database for restore
#!/bin/bash
# automate WPS Push Button using wpa_supplicant
# see also: https://w1.fi/cgit/hostap/plain/wpa_supplicant/README-WPS
# to make this run at startup, create a systemd unit that has "Requires=wpa_supplicant.service" and "After=wpa_supplicant.service"
INHIBIT="/etc/wpa_supplicant/wps_inhibit"
# Should probably sleep here as well and check the status after 10s or so. If not COMPLETED either wifi is down or wifi creds changed.
if [ -e $INHIBIT ]; then
exit 0
fi
@stickperson
stickperson / myweechat.md
Created May 30, 2019 16:04 — forked from pascalpoitras/config.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

You need at least WeeChat 2.5 for everything to work

Enable mouse

/mouse enable

### Keybase proof
I hereby claim:
* I am stickperson on github.
* I am stickperson (https://keybase.io/stickperson) on keybase.
* I have a public key whose fingerprint is F998 6A5C E28E 293D AC98 18BB D0E1 746E 4A64 8142
To claim this, I am signing this object:
@stickperson
stickperson / bdayclock
Last active August 29, 2015 14:28 — forked from buckeyeworldcitizen/bdayclock
Birthday word clock
//Theres two parts to this code: first the birthday part and then the clock part which i had on separate arduinos.
//The first section is original and the second is modified from Joe Caldwell at http://www.highonsolder.com who modified it from Scott Bezek who modified it from Doug Jackson
//Good luck
#include <Wire.h>
#include "RTClib.h"
#include <Adafruit_NeoPixel.h>