Skip to content

Instantly share code, notes, and snippets.

View jwhitmire's full-sized avatar

Jeff Whitmire jwhitmire

View GitHub Profile

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end
@ahoward
ahoward / net-http-debug.rb
Created December 10, 2010 20:06
a simple way to debug tons of libs that use ruby's net/http
BEGIN {
require 'net/http'
Net::HTTP.module_eval do
alias_method '__initialize__', 'initialize'
def initialize(*args,&block)
__initialize__(*args, &block)
@jamis
jamis / Easy Marshmallow Recipe
Created December 10, 2009 22:38
Easy Gourmet Marshmallows
EASY MARSHMALLOWS
-----------------
Marshmallows are perhaps one of the simplest confections you can make. They only
require a handful of ingredients, a batch can be thrown together in 10-15 minutes
(plus *cough* 3 hours for them to set), and you can flavor them however you like.
(You haven't LIVED until you've had coconut marshmallows!)
Hardware needed:
@alanbsmith
alanbsmith / Thin Crust Pizza Recipe.md
Last active August 12, 2017 17:09
My personal pizza recipe

Thin Crust Pizza Recipe

YIELD

This recipe yields 2 14" pizzas 🍕🍕

INGREDIENTS

DOUGH

  • 1 packet yeast
  • 1 tsp sugar (or honey or whatever)
INSERT INTO 'snippets' ('title', 'body') VALUES
(':+1:', '👍'),
(':-1:', '👎'),
(':100:', '💯'),
(':1234:', '🔢'),
(':8ball:', '🎱'),
(':a:', '🅰'),
(':ab:', '🆎'),
(':abc:', '🔤'),
(':abcd:', '🔡'),
@zerowidth
zerowidth / bash_profile.sh
Created January 3, 2013 16:21
custom test runners with bash / fuubar / test/unit. hacks heaped upon hacks for a particular dev environment.
# http://www.linuxjournal.com/content/use-date-command-measure-elapsed-time
function timer() {
if [[ $# -eq 0 ]]; then
echo $(date '+%s')
else
local stime=$1
etime=$(date '+%s')
if [[ -z "$stime" ]]; then stime=$etime; fi
@jwhitmire
jwhitmire / template-mysql2.rb
Created November 11, 2012 00:24
Rails 3 templates of interest to me
#
# Install mysql2 gem with local brew settings which normally fails during regular rails install
#
puts "Installing mysql2 gem"
run "gem install mysql2 -- --with-mysql-include=/usr/local/Cellar/mysql/5.5.27/include --with-mysql-lib=/usr/local/Cellar/mysql/5.5.27/lib"
@sway
sway / commits-by-hour
Created July 11, 2012 20:25 — forked from bobuss/commits-by-hour
Git commits funstats
#!/usr/bin/env bash
for i in $(seq -f %02g 0 23); do echo $( echo -e "$i\t"; git shortlog -n --format='%ad %s' | grep " $i:" | wc -l); done
@bobuss
bobuss / commits-by-hour
Created July 2, 2012 14:47
Git commits funstats
#!/usr/bin/env bash
for i in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23; do echo $( echo -e "$i\t"; git shortlog -n --format='%ad %s' | grep " $i:" | wc -l); done