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 / better.tsx
Created November 19, 2021 22:05
How do I do this better
const openApiList = [
{
swagger: "2.0",
info: {
description: "Test API",
version: "1.0.0",
title: "Request Catcher Testing API",
},
host: "kyung.requestcatcher.com",
basePath: "/root",
@zacharyc
zacharyc / email.html
Created November 18, 2021 23:34
Just an email Template for HTML Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Lime Insurance</title>
<style type="text/css">
body{
-webkit-text-size-adjust:none;
-ms-text-size-adjust:none;
- (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);
#!/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 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
@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 / 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 / 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 / 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 / old_way.sh
Created June 7, 2012 01:12
Chromedriver with WebDriverJS
~ $ /Applications/chromedriver