Skip to content

Instantly share code, notes, and snippets.

@dpflug
dpflug / keybase.md
Created August 30, 2018 21:05
keybase.md

Keybase proof

I hereby claim:

  • I am dpflug on github.
  • I am dpflug (https://keybase.io/dpflug) on keybase.
  • I have a public key whose fingerprint is F2B7 9996 66D8 3093 F8D4 2129 26CD D321 89AA 2885

To claim this, I am signing this object:

@dpflug
dpflug / macros.vim
Created April 11, 2018 03:03
Stars Without Number Revised pdftotext Background fixing macro set
let @a = 'I====<ESC>A====<ESC>' " Format the header
let @b = 'jjV}kJ' " Re-wrap the paragraph under
let @c = 'j0f-I* <ESC>f-i <Right> <ESC>' " Skill formatter, ensures we're on a line with a hyphen first
let @d = 'jjA::<ESC>@c' " Format "Free Skills"
let @e = 'ma/quick<Enter>dd/0<Enter>Pd}/0<Enter>Pd}''ap' " Gather the "Quick Skills" - The '' is just an escaped single quote to take us back to the a mark
let @f = 'A::<ESC>3@c' " Format "Quick Skills"
let @g = 'O<Enter>[cols="^1,4,^1,4", width="40%"]<Enter>|=====<ESC>0"xY' " Create table header, save table delimiter to register k
let @h = 'jma/grow<Enter>dd''ap/d8<Enter>dd''ajp/learn<Enter>dd''ajjp' " Get our column labels arranged
let @i = '<ESC>''aV/8<Enter>njj:s/^\S/| &<Enter>"x
# Pipe the output of unzip -t into this to fix it spraying files all over your precious directory,
# rather than deflating into one nice directory like RMS intended.
# Also, there's probably a better way to do this, but it's 1AM.
awk '/OK/ { if (NF > 3) print "\42"$2,$(NF-1)"\42" ; else print "\42"$2"\42" }' | xargs rm -r
@dpflug
dpflug / say-hi.py
Last active August 29, 2015 14:01 — forked from zeekay/say-hi.py
#!/usr/bin/env python2
import os, pwd, select, signal, socket, sys, time
irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
username = pwd.getpwuid(os.getuid())
hostname = socket.gethostname()
if not sys.stdin.isatty(): sys.stdin = open('/dev/tty')
def hello():
@dpflug
dpflug / alex.py
Created November 19, 2013 04:26
A plugin for the Yakr IRC bot that may eventually mimic alex from IFMUD. https://github.com/theepicsnail/Yakr http://pages.cs.wisc.edu/~dbs/ifmud/alex.html
from yakr.plugin_base import *
from re import match
import pickle
set_command_prefix("")
ALEX_STORE = "AlexStore.pkl"
ALEX_CACHE = {}
def start():
global ALEX_CACHE
@dpflug
dpflug / gist:1986830
Created March 6, 2012 15:36
Substrate by j.tarbell
// Substrate Watercolor
// j.tarbell June, 2004
// Albuquerque, New Mexico
// complexification.net
// Processing 0085 Beta syntax update
// j.tarbell April, 2005
int dimx = 250;
int dimy = 250;
@dpflug
dpflug / Plugins_URLTitles.py
Created May 12, 2011 21:17
URL titles for SuperBot2
from Hook import bindFunction, requires, prefers
@requires("URLUtils")
@prefers("Colors")
class URLTitle:
@bindFunction(message="(https?://[^\s!,]*)")
def url_title(self, target, colorize, grabTitle, message0):
if toMe:
return # Ignore PMs and notices