Skip to content

Instantly share code, notes, and snippets.

View nessamurmur's full-sized avatar
☃️
R&R

Nessa Jane Marin nessamurmur

☃️
R&R
View GitHub Profile
@nessamurmur
nessamurmur / open.rb
Created September 26, 2013 23:01
Open pbcopy
open(| pbcopy”, “w”) { |clipboard| clipboard.write array.inspect }
@nessamurmur
nessamurmur / pre-commit.sh
Last active December 23, 2015 19:59 — forked from alexbevi/pre-commit.sh
Try to prevent binding.prys being commited
# Git pre-commit hook to check all staged Ruby (*.rb/erb/coffee) files
# for Pry binding references
#
# Installation
#
# ln -s /path/to/pre-commit.sh /path/to/project/.git/hooks/pre-commit
#
# Based on
#
# http://codeinthehole.com/writing/tips-for-using-a-git-pre-commit-hook/
@nessamurmur
nessamurmur / gist:6627481
Created September 19, 2013 18:06
SQL is NOT DRY.
SELECT people.first_name,
people.last_name,
SUM(CAST(transactions.amount_in_cents AS float) / 100.00), // total transaction amount all time
ytd.amount,
transactions.amount_in_cents, // last transaction processed
last_transaction.created_at // date of last transaction
FROM people
JOIN transactions
ON people.id = transactions.person_id
@nessamurmur
nessamurmur / sidekiq
Created August 29, 2013 16:05
Sidekiq init script with deployment user
#!/bin/bash
# sidekiq Init script for Sidekiq
# chkconfig: 345 100 75
#
# Description: Starts and Stops Sidekiq message processor for Stratus application.
#
# User-specified exit parameters used in this script:
#
# Exit Code 5 - Incorrect User ID
# Exit Code 6 - Directory not found