Skip to content

Instantly share code, notes, and snippets.

View sc0ttman's full-sized avatar
🏠
Working from home

Scott sc0ttman

🏠
Working from home
  • Calgary
View GitHub Profile
# A class-based template for jQuery plugins in Coffeescript
#
# $('.target').myPlugin({ paramA: 'not-foo' });
# $('.target').myPlugin('myMethod', 'Hello, world');
#
# Check out Alan Hogan's original jQuery plugin template:
# https://github.com/alanhogan/Coffeescript-jQuery-Plugin-Template
#
(($, window) ->
@sc0ttman
sc0ttman / static.rake
Created June 23, 2011 00:06
Export static pages
namespace :static do
desc 'Generate static html files of all views in the pages folder'
#usage: rake static:generate
task :generate do
# note: add these gems to your gemfile:
# gem "nokogiri"
# gem "rest-open-uri","1.0.0"
puts "generating..."
@sc0ttman
sc0ttman / .gitignore
Created June 23, 2011 15:46 — forked from ledermann/.gitignore
rake deploy and rake cache_assets for Heroku (storing JS minimized and gzipped on Amazon S3)
# Add this
public/javascripts/all.js
@sc0ttman
sc0ttman / dabblet.css
Created March 30, 2012 01:39
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@sc0ttman
sc0ttman / gist:2839529
Created May 30, 2012 23:21
Pretty dir trees
// As seen here: http://stackoverflow.com/questions/1581559/ascii-library-for-creating-pretty-directory-trees
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
AB5, BC4, CD8, DC8, DE6, AD5, CE2, EB3, AE7
@sc0ttman
sc0ttman / Folder Preferences
Created August 8, 2012 20:29 — forked from chrisyour/Folder Preferences
Show hidden files and hidden folders (except .git) in your TextMate project drawer
# Want to show hidden files and folders in your TextMate project drawer? Simple, just modify the file and folder patterns in TextMate's preferences.
# Instructions:
# Go to TextMate > Preferences...
# Click Advanced
# Select Folder References
# Replace the following:
# File Pattern
Ruby Editor:
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
Autofocus textarea:
data:text/html, <textarea style="font-size: 1em;font-family:'Lucida Console';width: 100%; height: 100%; border: none; outline: none" autofocus />
@sc0ttman
sc0ttman / .profile.sh
Created March 3, 2012 04:00 — forked from puppybits/.profile.sh
OSX terminal commands
PROJECT_STORE="~/\\\$Money\ Store/"
COMPANY="PB"
HOSTNAME="FastBook"
############## MACROS ##############
##### DEVELOPMENT
alias sshcopy="cat ~/.ssh/id_rsa.pub | pbcopy"
alias iphonsim="open /Volumes/Nicole/Library/Application\ Support/iPhone\ Simulator"
alias flashlibrary="open /Volumes/Nicole/Library/Preferences/Macromedia/Flash\ Player/\#SharedObjects"
@sc0ttman
sc0ttman / iphone.sh
Last active December 17, 2015 11:09
Copy iphone simulator to apps
sudo ln -sf /Applications/Xcode.app/Contents/Applications/iOS\ Simulator.app /Applications/iOS\ Simulator.app
# As of iOS 7 the location is:
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app