Skip to content

Instantly share code, notes, and snippets.

Gordon Diggs gdiggs

Block or report user

Report or block gdiggs

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

Keybase proof

I hereby claim:

  • I am gdiggs on github.
  • I am gordondiggs ( on keybase.
  • I have a public key ASB-ePD0FGhmOOfx1IQ0bnWuo3C2ca2gT-cqJ5pxc3cGmQo

To claim this, I am signing this object:

gdiggs / comments.haml
Created Jun 10, 2011
multi-line haml comments
View comments.haml
-# This comment can be
split up in multiple lines just
by indentation!
gdiggs / tempserver.go
Created Apr 16, 2014
One Line Go server to serve static assets from current folder
View tempserver.go
echo "package main; import \"net/http\"; import \"os\"; import \"os/exec\"; import \"os/signal\"; func main() { go func() { sigchan := make(chan os.Signal, 2); signal.Notify(sigchan, os.Interrupt); <-sigchan; cmd := exec.Command(\"rm\", \"tempserver.go\"); cmd.Run(); os.Exit(0) }(); panic(http.ListenAndServe(\":8000\", http.FileServer(http.Dir(\".\")))) }" > tempserver.go && go run tempserver.go
gdiggs / theme.terminal
Created May 5, 2017
OS X Terminal Theme
View theme.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
gdiggs / example.rb
Created Oct 8, 2016
Generalized Soft Deletion for Rails
View example.rb
class Example < ActiveRecord::Base
include SoftDeletion
gdiggs / index.js
Created Aug 5, 2016
What should I listen to? Lambda
View index.js
process.env.NODE_CONFIG_DIR = "/var/task/config";
const https = require("https")
, queryString = require("querystring");
// Twilio Credentials
const accountSid = ""
, authToken = ""
, fromNumber = ""
, toNumber = "";
gdiggs / gist:7565902
Created Nov 20, 2013
Kelly's Stuffed Mushrooms
View gist:7565902


  • 20ish large mushrooms (baby bellas)
  • ½ bunch chopped green onions
  • 16 oz. container of chopped clams (they have frozen ones at whole foods)
  • 2-3 cloves minced garlic
  • 1/2 cup seasoned bread crumbs
  • pinch of black pepper
  • tablespoon of dried parsley
  • some basil and oregano
View gist:7112727
-----> Ruby/Rails app detected
-----> Using Ruby version: ruby-2.1.0-rbx-2.1.1
-----> Installing dependencies using Bundler version 1.4.0.rc.1
Ruby version change detected. Clearing bundler cache.
Old: rubinius 2.0.0.m8 (1.9.3 0849828f 2013-08-02 JI) [x86_64-unknown-linux-gnu]
New: rubinius 2.1.1 (2.1.0 be67ed17 2013-10-18 JI) [x86_64-linux-gnu]
Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at Thanks!
An exception occurred running vendor/bundle/rbx/2.1/bin/bundle:
gdiggs / test_response_speed.rb
Created Sep 16, 2013
Test response speed (somewhat poorly)
View test_response_speed.rb
#!/usr/bin/env ruby
# Given a URL, hit it a bunch of times and record the time it takes
# please dont use this for DDOS
TRIALS = 100
url = ARGV[0]
if !url
You can’t perform that action at this time.