Skip to content

Instantly share code, notes, and snippets.

View christoomey's full-sized avatar

Chris Toomey christoomey

View GitHub Profile
@christoomey
christoomey / canvas.html
Created July 26, 2012 20:43
Canvas Radial Gradient w/ Prerendering
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: auto;
padding: 0px;
}
</style>
<script>
@christoomey
christoomey / quix.txt
Created June 29, 2012 12:40
Quix custom searches
@Chris's searches
@Chris's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
@christoomey
christoomey / Gemfile
Created February 18, 2012 03:57
Sprockets sans Rails
source :rubygems
gem "middleman", ">=2.0" # Configure Sprockets
gem "jquery-rails" # provide jquery in a rails engine
gem "backbone-rails" # provides underscore as well
gem "bourbon" # thoughtbot SASS mixins
gem "ejs" # provide JST global access to templates
gem "handlebars_assets" # use handlebars JS template engine
gem "rb-fsevent" # OS notifications for file changes (rather than polling)
@christoomey
christoomey / gist:1359824
Created November 12, 2011 00:55
Clean all the gems!
gem list | cut -d ' ' -f 1 | while read g; do gem uninstall -aIx $g; done
@christoomey
christoomey / gist:1238761
Created September 24, 2011 00:12
nginx management script
#! /bin/sh
### BEGIN INIT INFO
#
# Source https://raw.github.com/jnstq/rails-nginx-passenger-ubuntu/master/nginx/nginx
#
# Provides: nginx
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
@christoomey
christoomey / gist:1206762
Created September 9, 2011 17:09
Linode Ubuntu 10.04 (Lucid) with passenger & nginx for rails hosting
#################################################################
# #
# A guide to setting up a linode Ubuntu VPS for #
# Ruby on Rails hosting with nginx & passenger #
# #
# Compiled by Chris Toomey [ctoomey.com] on Sept. 9 2011 #
# #
#################################################################
# Start with base 10.04 image. Setup the DNS for any domains you
@christoomey
christoomey / Guardfile
Created May 23, 2011 19:40 — forked from ordinaryzelig/Guardfile
guard-coffeescript config for entire directory structure
guard 'coffeescript', {
:output => '.compiledJS',
:bare => true
} do
watch %r{(.*/(.+\.coffee))}
end
@christoomey
christoomey / gist:965669
Created May 11, 2011 00:23
Javascript object literal code organization pattern
// Object literal code organization pattern. From Rebecca Murphy's blog:
// http://blog.rebeccamurphey.com/2009/10/15/using-objects-to-organize-your-code
var myModule = {
'config' : {
'option1' = val,
'cached_elem' = $(this)
},
'init' : function(config) {
// provide for custom configuration via init()
#!/usr/bin/env ruby
#
# A quick script to dump an overview of all the open issues in all my github projects
#
require 'octokit'
require 'awesome_print'
require 'rainbow'
@christoomey
christoomey / gist:956173
Created May 4, 2011 22:25
Bash function to list all symlinks in current directory
# List all symlinks in current directory
lns() {
find ./ -type l -maxdepth 1 | awk '{ sub(/.\/+/, ""); print }'
}
# List broken symlinks under current directory
lnsm() {
find -L ./ -type l -maxdepth 1
}