Skip to content

Instantly share code, notes, and snippets.

View steder's full-sized avatar
🐧
Being a penguin

Mike Steder steder

🐧
Being a penguin
View GitHub Profile
@steder
steder / keybase.md
Created March 13, 2014 16:55
keybase.md

Keybase proof

I hereby claim:

  • I am steder on github.
  • I am steder (https://keybase.io/steder) on keybase.
  • I have a public key whose fingerprint is 98B7 F879 6032 96D7 9AA8 3FAE 2D8A 2327 04C0 02A2

To claim this, I am signing this object:

@steder
steder / phantom-designs.js
Created April 3, 2014 13:35
Download www.threadless.com/designs and save the generated markup
/*
Download www.threadless.com/designs and
save the generated markup.
*/
/**
* Wait until the test condition is true or a timeout occurs. Useful for waiting
* on a server response or for a ui change (fadeIn, etc.) to occur.
@steder
steder / sql example
Created April 21, 2014 14:11
ipython examples
# coding: utf-8
# # this is an ipython notebook
#
# This is a markdown block that I can use to describe whatever I want to talk about.
# In[1]:
POSTGRES_URI = "postgresql+psycopg2://localhost:5432/steder"
execve("/usr/bin/python", ["python", "test_geoip.py"], [/* 30 vars */]) = 0
brk(0) = 0x1a2e000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fb1412ad000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=36559, ...}) = 0
mmap(NULL, 36559, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fb1412a4000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@steder
steder / git-setup.sh
Created August 23, 2011 13:37
Git setup niceties
# via https://gist.github.com/419201#file_gitconfig.bash
# Install (from Matt's gist) these useful Git aliases & configurations with the following command:
# $ bash <(curl -s https://raw.github.com/gist/419201/gitconfig.bash)
git config --global color.ui auto # colorize output (Git 1.5.5 or later)
git config --global color.interactive auto # and from 1.5.4 onwards, this will works:
echo "Set your name & email to be added to your commits."
echo -n "Please enter your name: "
@steder
steder / nosy.py
Created September 15, 2011 22:39
nosy - my commandline continuous integration tool from the Textura days
#!/usr/bin/env python
# nosy: commandline continuous integration for test driven development
#
# Copyright (C) 2008 Michael Steder <steder@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@steder
steder / pre-commit
Created November 17, 2011 15:57 — forked from spulec/pre-commit
Yipit Pre-commit Hook
#!/usr/bin/env python
import os
import re
import subprocess
import sys
modified = re.compile('^(?:M|A)(\s+)(?P<name>.*)')
CHECKS = [
@steder
steder / sorted.py
Created January 21, 2012 21:05
Words Blog Post Snippets
import itertools
class Dictionary(object):
def __init__(self):
self.words = {}
def insert(self, word):
letters = "".join(sorted(word))
if letters not in self.words:
self.words[letters] = [word]
require 'rubygems'
require 'nokogiri'
require 'fileutils'
require 'date'
require 'uri'
# usage: ruby import.rb my-blog.xml
# my-blog.xml is a file from Settings -> Basic -> Export in blogger.
data = File.read ARGV[0]
@steder
steder / gofind.sh
Created September 9, 2017 02:03
Quickly jump to $GOPATH/src directory
#!/usr/bin/env bash
GOPATH=~/go/src
# Just include this function in your ~/.bashrc
function gof {
if (( $# == 0 )); then
echo "usage: $gof <dir>"
echo "jumps to $GOPATH/src directory matching <dir>"
return