Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Zachary Cohen zacharyc

🏠
Working from home
View GitHub Profile
@zacharyc
zacharyc / MoviesSeen.md
Last active Sep 1, 2015
Movies Kelsey Needs To See
View MoviesSeen.md
  1. Mission Impossible
  2. Pitch Perfect
@zacharyc
zacharyc / gist:10929388
Created Apr 16, 2014
additional action or testing parameters in rake files
View gist:10929388
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
View gist:8141791
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == TIP_SECTION && indexPath.row == TIP_ROW) {
if (cell.userInteractionEnabled) {
[cell layoutSubviews];
UIView *editView = [self pencilView];
editView.frame = CGRectMake(cell.textLabel.frame.origin.x + cell.textLabel.frame.size.width + X_OFFSET,
cell.textLabel.frame.origin.y - Y_OFFSET,
editView.frame.size.width,
editView.frame.size.height);
View createSite.rb
#!/usr/bin/env ruby
if ARGV.count < 1
puts "Usage: #{$0} projectName"
exit
end
projectName = ARGV[0];
puts "Creating a web project: " + projectName
@zacharyc
zacharyc / .gitignore
Created May 22, 2013
Montage Git ignore
View .gitignore
# Ignore all node modules
node_modules
# Ignore Mac OS stupidness
.DS_Store
# Ignore editor junk
.idea
atlassian-ide-plugin.xml
TEST-*.xml
@zacharyc
zacharyc / gist:5542245
Created May 8, 2013
Quick snippet for printing out call stack in console.
View gist:5542245
NSArray *syms = [NSThread callStackSymbols];
if ([syms count] > 1) {
NSLog(@"%@ - caller: %@", NSStringFromSelector(_cmd),[syms objectAtIndex:1]);
}
@zacharyc
zacharyc / gist:3679365
Created Sep 8, 2012
Sublime Text 2 Option Key Mapping
View gist:3679365
{ "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 / fonts.css
Created Jul 27, 2012
Montage/Ninja Page Idea
View fonts.css
@import url(https://fonts.googleapis.com/css?family=Lato:300italic,700italic,300,700);
@zacharyc
zacharyc / connect.js
Created Jul 24, 2012
Crazy Loading of Screening.js Problem
View connect.js
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 / old_way.sh
Created Jun 7, 2012
Chromedriver with WebDriverJS
View old_way.sh
~ $ /Applications/chromedriver