Skip to content

Instantly share code, notes, and snippets.

View allspiritseve's full-sized avatar

Cory Kaufman-Schofield allspiritseve

  • Dexter, MI
View GitHub Profile
@clupprich
clupprich / tests.watchr
Created August 12, 2011 11:47 — forked from boxedup/tests.watchr
watchr file for Rails with test/unit and turn
ENV["WATCHR"] = "1"
system 'clear'
def growl(message)
growlnotify = `which growlnotify`.chomp
title = "Watchr Test Results"
message.gsub!(/\e\[\d+m/, "")
image = message.include?('0 failures, 0 errors') ? "~/.watchr_images/passed.png" : "~/.watchr_images/failed.png"
options = "-w -n Watchr --image '#{File.expand_path(image)}' -m '#{message}' '#{title}'"
system %(#{growlnotify} #{options} &)
@vlucas
vlucas / hack.sh
Created April 2, 2012 16:50 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@kevinchampion
kevinchampion / module_pattern.js
Last active December 12, 2015 12:29
Javascript namespacing pattern
/**
* This pattern allows you to manually return the functions you want to be public,
* thus allowing for private functions.
*/
var Mcard = (function() {
/**
* Helper to update form and results based on query as retrieved from a url
* change.
@milgroma
milgroma / tracking_usage
Created February 3, 2014 15:35
Are people using our tool?
def self.are_you_using_this
## get all of the users
u = User.all
## for each user, do the following thing
u.each do |u|
## get the date of user’s latest session
last_session_date = u.sessions.last ? u.sessions.last.created_at : nil