Skip to content

Instantly share code, notes, and snippets.

View abstrctn's full-sized avatar
🏠
Working from home

Michael Strickland abstrctn

🏠
Working from home
View GitHub Profile
### Keybase proof
I hereby claim:
* I am abstrctn on github.
* I am abstrctn (https://keybase.io/abstrctn) on keybase.
* I have a public key whose fingerprint is 2752 CFBE DCA8 4776 B715 AAE8 113C A165 83BF 6F90
To claim this, I am signing this object:
@abstrctn
abstrctn / README.md
Last active October 5, 2021 17:49
Don't make assumptions about gender in your documentation

gender.vim

Don't make assumptions about gender in your documentation.

If you use VIM, you can use the following configuration to alert you to any gender-specific pronouns in your documentation, giving you the chance to de-gender them as necessary.

gender.vim extends the syntax highlighting of a filetype to highlight certain words.

You will need to load this after any default syntax highlighting gets applied to your filetype. The after directory in VIM gets loaded after other plugins or syntax files, making it the location where you should store extensions to existing behavior. If doesn't exist already, make a ~/.vim/after/syntaxdirectory, and placegender.vim` inside it.

var s=document.createElement('script');
s.setAttribute('src','http://code.jquery.com/jquery.js');
document.getElementsByTagName('body')[0].appendChild(s);
setTimeout(function() {
svg = $("svg[width=690]")[0];
var svgNS = svg.namespaceURI;
var bg = document.createElementNS(svgNS, 'pattern');
@abstrctn
abstrctn / gist:10621244
Last active August 29, 2015 13:59
"Special" day formats
# http://www.timeanddate.com/date/special-dates.html
patterns = [
"%Y-%m-%d", # 2001-01-31
"%y-%m-%d", # 01-01-31
"%Y-%-m-%-d", # 2001-1-31
"%y-%-m-%-d", # 01-1-31
"%m-%d-%Y", # 01-31-2001
"%m-%d-%y", # 01-31-01
"%-m-%-d-%Y", # 1-31-2001
@abstrctn
abstrctn / cook
Created December 6, 2012 15:56
Rebuild + install a gem under development to your current gemset
#!/bin/bash
cd ~/code/$1;
v="`gem build $1.gemspec | grep -o '\(\d\+\.\d\+\.\d\+\)$'`";
cd -; gem install ~/code/$1/$1-$v.gem
@abstrctn
abstrctn / gist:3727751
Created September 15, 2012 13:05
Fech demo
# Install Fech
gem install fech
# Go into IRB and load Fech
irb
require 'rubygems'
require 'fech'
# Initialize a Filing object. This one is from Tim Pawlenty's (late) presidential campaign.
filing = Fech::Filing.new(723604)
[glob]
#!/bin/bash
find . -name "*$1*"
[fglob]
#!/bin/bash
# find . -name "*$1*"
@abstrctn
abstrctn / oly-debug.js
Created May 7, 2012 16:29
Oly template debugger
// Toggle display of template paths
$('.oly-debug, .oly-debug-template-path').toggle();
/* Ruby helper: create ruby variables for a given segment of the template:
e = Event
p = Phase
u = Unit (best guess)
r = UnitResult
cr = CumulativeResult
pr = PhaseResult
# I can create records and save current records…
elec_sum = ElectronicSummary.first
elec_sum.save
elec_sum = ElectronicSummary.new
elec_sum.candidate_id = 1
elec_sum.save
# but I can't modify existing records
elec_sum = ElectronicSummary.first
@abstrctn
abstrctn / nyu_scraper.py
Created April 26, 2011 04:06
nyu.OpenCourseSearch.org Scraper
import cookielib, urllib2, urllib, BeautifulSoup, re, time, pickle
#from courses.helpers import *
"""
This class scrapes NYU's course registration listings on Albert,
and writes the pickled data out to a specified file directory.
Shouldn't require a working NYU Net ID to work, but adding it is worth a shot
if something seems broken.