Skip to content

Instantly share code, notes, and snippets.

View groveriffic's full-sized avatar

Sam Ehlers groveriffic

View GitHub Profile
@groveriffic
groveriffic / .vimrc
Created April 4, 2012 18:48
My Vimrc
set wildmode=list,longest
if has("gui_running")
colorscheme darkblue
set guifont=Bitstream\ Vera\ Sans\ Mono\ Bold:h13
set guioptions-=T
endif
if has("gui_macvim")
@groveriffic
groveriffic / mathlink.rb
Created August 31, 2012 03:33
jruby-mathlink
@groveriffic
groveriffic / pg_hba.conf
Created November 21, 2012 00:22
Postgres allows any user to connect from localhost to localhost
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
class MetaDerp
### DENSE HORRIBLE CODE
# This should be broken up into smaller chunks possibly moved out into a mixin
# to hide it's horribleness
class << self
def hunt(name, *keys)
class_eval %[
def #{name}
#{keys.map{|key| "row[#{key.inspect}]" }.join(' || ')}
end
#!/bin/bash
git checkout master
git pull
git branch --remotes --merged | grep origin > .master_merged
git checkout release-staging
git pull
git branch --remotes --merged | grep origin > .staging_merged
diff .master_merged .staging_merged
rm .master_merged .staging_merged
-- Prerequisites:
-- Boto: sudo pip install boto
-- Boto Config File: see https://code.google.com/p/boto/wiki/BotoConfig
-- Add PL Language Extensions
CREATE EXTENSION IF NOT EXISTS plpythonu;
CREATE OR REPLACE FUNCTION _s3_get(bucket text, key text)
RETURNS bytea AS $$
@groveriffic
groveriffic / external_services_snippet_spec.rb
Created March 5, 2014 20:42
This automatically disables specs when the url is not specified via environment variable.
let(:ftp_url) {
if ENV['FTP_TEST_URL']
URI(ENV['FTP_TEST_URL'])
else
pending "Set ENV['FTP_TEST_URL'] to enable"
end
}
@groveriffic
groveriffic / consumer.rb
Created April 22, 2014 21:59
Basically 'cat' over AMQP to demonstrate exchanges and routing keys
require 'rubygems'
require 'bundler'
Bundler.require(:default)
Bunny.run(ENV['AMQP_URL']) do |conn|
routing_key = 'test.demonstration'
conn.with_channel do |ch|
queue = ch.queue('composinator.test.demonstration')
exchange = ch.direct('composinator')

Keybase proof

I hereby claim:

  • I am groveriffic on github.
  • I am groveriffic (https://keybase.io/groveriffic) on keybase.
  • I have a public key whose fingerprint is D2BE D5ED DAF4 7485 A60C 63B1 FE4C 0459 2039 63AA

To claim this, I am signing this object:

package ids
import (
"fmt"
"testing"
"testing/quick"
)
func ExampleMarshalString() {
fmt.Print("\n")