Skip to content

Instantly share code, notes, and snippets.

View todd's full-sized avatar
🤘

Todd Bealmear todd

🤘
View GitHub Profile
@todd
todd / get_position.py
Created November 18, 2011 01:42
Count Columns in a Spreadsheet
"""
This is an overly complicated method I threw together to do something I could have easily done by
tallying on paper or something similar. That's not how I roll.
The method below will calculate the numerical position of a spreadsheet column based on its alphabetic
representation. I use a lot of VBA and Excel formulas at work that need this information to function
properly and I got tired to counting these columns manually - a real chore when you start getting into
columns represented by multiple characters.
NOTE: Excel is kind of inconsistent with its numbering format. Depending on what you're trying to
@todd
todd / getissues.py
Created December 23, 2011 23:30
Download Hacker Monthly's Xmas Special off S3
# Edit: Changes inspired by comments from HN users jules and anthonyb
import os
for i in range(1,20):
os.system("wget http://s3.amazonaws.com/bearwithclaws.baconfile.com/hackermonthly-issue%03d.zip" % i)
@todd
todd / shovel.py
Created April 10, 2012 06:17
Shovel file for Jekyll tasks
'''
This is a Shovel (https://github.com/seomoz/shovel) script
that will create new Jekyll content and automatically
generate the YAML Front Matter boilerplate.
'''
import datetime
import os.path
import re
import sys
@todd
todd / 2.0.0-preview1
Created November 2, 2012 01:55
rbenv installation script for Ruby 2.0.0-preview1
install_package "yaml-0.1.4" "http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz"
install_package "ruby-2.0.0-preview1" "http://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-preview1.tar.gz"
@todd
todd / 2.0.0-preview1.sh
Created November 2, 2012 02:01
Shell Script to Install Ruby-2.0.0-preview1 with rbenv
curl https://raw.github.com/gist/3998177/0ac991d732fbfba9f3d8cfd14b861461ef2d9393/2.0.0-preview1 > /tmp/2.0.0-preview1
rbenv install /tmp/2.0.0-preview1
@todd
todd / Preferences.sublime-settings
Created November 19, 2012 07:12
Awesome Sublime Text 2 Settings
{
"font_size": 12.0,
"bold_folder_labels": true,
"caret_style": "phase",
"highlight_line": true,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"scroll_past_end": true,
"spell_check": true,
"show_full_path": true
@todd
todd / state_validator.coffee
Created February 17, 2013 08:18
State abbreviation validator for Parsley.js in CoffeeScript.
$("#multipage").parsley
validators:
state: (val)->
val.toUpperCase() in [
'AK','AL','AR','AS','AZ','CA','CO','CT','DC','DE','FL','GA','GU','HI',
'IA','ID','IL','IN','KS','KY','LA','MA','MD','ME','MH','MI','MN','MO',
'MS','MT','NC','ND','NE','NH','NJ','NM','NV','NY','OH','OK','OR','PA',
'PR','PW','RI','SC','SD','TN','TX','UT','VA','VI','VT','WA','WI','WV',
'WY'
]
@todd
todd / atom_snippets.cson
Last active August 29, 2015 13:56
Helpful Atom Snippets (Work in Progress)
'.source.ruby':
'RSpec describe':
'prefix': 'describe'
'body': 'describe "${1:class_or_method}" do\n $0\nend'
'RSpec context':
'prefix': 'context'
'body': 'context "$1" do\n $0\nend'
'RSpec expect':

Keybase proof

I hereby claim:

  • I am todd on github.
  • I am todd (https://keybase.io/todd) on keybase.
  • I have a public key whose fingerprint is BF41 F6FA F4EC 9E09 D940 0471 1549 098F 40CD 729D

To claim this, I am signing this object:

@todd
todd / libmpdclient_test.go
Last active August 29, 2015 14:00
Go-libmpdclient Binding Test
package main
/*
#cgo pkg-config: libmpdclient
#include <stdlib.h>
#include <mpd/client.h>
*/
import "C"