Skip to content

Instantly share code, notes, and snippets.

View jtgeibel's full-sized avatar

Justin Geibel jtgeibel

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jtgeibel on github.
  • I am jtgeibel (https://keybase.io/jtgeibel) on keybase.
  • I have a public key whose fingerprint is A331 ECD4 DD58 7552 CAE2 AC9B AF18 6B40 E50D F65B

To claim this, I am signing this object:

@jtgeibel
jtgeibel / etc-init.d-nginx
Last active December 16, 2015 15:29 — forked from loopj/passenger-nginx-spdy.sh
Install the latest nginx with passenger and some extensions.
#! /bin/sh
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the nginx web server
# Description: starts nginx using start-stop-daemon
@jtgeibel
jtgeibel / git-rebase-todo
Created November 22, 2011 06:43
My first rebase
pick 5a5b634 Refactored location code. Now using County and Neighborhood. This is kind of hackish and still needs some fixups, but the features I care about are implemented. Make sure your schema mates the supplied db/schema.rb
pick 0aaaaa4 User shouldn't have to be a vendor in order to advertise skills.
pick fcf4de0 No longer link to metro_areas interface on the admin dashboard
pick 865e14f Select all users for displaying on skills index page.
pick 52b5ba2 Query database to find users with skills, even if they are not marked as a vendor.
pick 16a19b4 Welcome about now sends you to your profile instead of welcome_invite.
pick efe156a Fixed up some text and translations. Some of them are hackish and stored directly in the code instead of lang/
pick 01df5a2 Switching to a graphical drop down user-menu.
pick a039811 Turning off caching on the front page. I should really fix it so that updatings posts clears this cache.
pick dbd3ba5 Import Google Analytics code. You must also place a code snippet in your own
@jtgeibel
jtgeibel / parser.rb
Created October 29, 2011 14:45
Parsing Relay Logic with Ruby
require 'parslet'
class ML2Parser < Parslet::Parser
def consume_until terminator, consumable = any
(terminator.absent? >> consumable).repeat >> terminator
end
rule(:logic_section) { sp? >> (assign | comment).repeat}
rule(:statement) { sp >> expression.as(:exp) >> sp >> str('TO') >> sp >> coil_list.as(:to) >> sp? >> str(';') >> sp? }
rule(:assign) { (str('ASSIGN') >> statement).as(:v) | (str('NV.ASSIGN') >> statement).as(:nv) }