Skip to content

Instantly share code, notes, and snippets.

View zacharyc's full-sized avatar
Working from home

Zachary Cohen zacharyc

Working from home
View GitHub Profile
@zacharyc
zacharyc / gist:10929388
Created April 16, 2014 20:25
additional action or testing parameters in rake files
desc 'create a test file to see if cron is working'
task :create_test_file, [:push] do |t, args|
if(args.push)
puts "push provided"
end
File.open("out.txt", 'w') {|f| f.write("This is a test file") }
end
@zacharyc
zacharyc / MoviesSeen.md
Last active September 1, 2015 18:16
Movies Kelsey Needs To See
  1. Mission Impossible
  2. Pitch Perfect
@zacharyc
zacharyc / local-storage-logger.js
Created April 6, 2012 00:30
Local Storage Logger
//console.log("creating localStorageLogger;");
function logLocalStorage(message) {
var currentStack = localStorage.getItem("log");
localStorage.setItem("log", currentStack + ";\n " + new Date() + message);
}
@zacharyc
zacharyc / cheer-csv-parser.rb
Created May 1, 2012 15:00
Cheerleader CSV Parser
#!/Users/zacharyc/.rvm/rubies/ruby-1.9.2-head/bin/ruby
# This script assumes there is a folder named ./emails for the content to go into
require 'csv'
#load the cheerleaders
file = CSV.read("team.csv")
print file.class
@zacharyc
zacharyc / old_way.sh
Created June 7, 2012 01:12
Chromedriver with WebDriverJS
~ $ /Applications/chromedriver
@zacharyc
zacharyc / connect.js
Created July 24, 2012 00:49
Crazy Loading of Screening.js Problem
console.log('############ running connect.js', a, Screening, Screening.launchApp());
var testWindow = window.open('', 'slave');
driver.switchTo().window('slave');
console.log(Screening);
driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click().then(function() {
driver.getTitle().then(function(title) {
@zacharyc
zacharyc / fonts.css
Created July 27, 2012 23:30
Montage/Ninja Page Idea
@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700);
@zacharyc
zacharyc / gist:3679365
Created September 8, 2012 20:16
Sublime Text 2 Option Key Mapping
{ "keys": ["alt+left"], "command": "move", "args": {"by": "subwords", "forward": false} },
{ "keys": ["alt+right"], "command": "move", "args": {"by": "subword_ends", "forward": true} },
{ "keys": ["alt+shift+left"], "command": "move", "args": {"by": "subwords", "forward": false, "extend": true} },
{ "keys": ["alt+shift+right"], "command": "move", "args": {"by": "subword_ends", "forward": true, "extend": true} },
@zacharyc
zacharyc / gist:5542245
Created May 8, 2013 17:59
Quick snippet for printing out call stack in console.
NSArray *syms = [NSThread callStackSymbols];
if ([syms count] > 1) {
NSLog(@"%@ - caller: %@", NSStringFromSelector(_cmd),[syms objectAtIndex:1]);
}
@zacharyc
zacharyc / .gitignore
Created May 22, 2013 19:22
Montage Git ignore
# Ignore all node modules
node_modules
# Ignore Mac OS stupidness
.DS_Store
# Ignore editor junk
.idea
atlassian-ide-plugin.xml
TEST-*.xml