Skip to content

Instantly share code, notes, and snippets.

Welcome to San Francisco!

Getting around town

Walk to Fisherman's Wharf by going down the hill and taking a left on Columbus. Or take a right to check out North Beach. We advise against taking taxis – instead, enjoy your first ride free on Lyft (use code STANFORD5) and Uber (use code nedzy).

Dining

Checking out

Cleaners will be coming at 2pm the day of your checkout. If you need to stay later, please coordinate with us. If you're heading to the airport, we suggest scheduling a ride on Wingz. Visit wingz.me/invite/223846 for $5 off your ride.

var loadTypography = function (newStyles, sharedStyles) {
var alignmentHash = {
'left': 0,
'right': 1,
'center': 2,
'justified': 3
};
// removeAllStyles();
@nolastan
nolastan / rough-circle.cocoascript
Last active October 18, 2015 23:55
Creates a really rough circle out of curves
var color = "#dd0000";
var doc = context.document;
var path = NSBezierPath.bezierPath();
var unit = 20;
path.moveToPoint(NSMakePoint(0,0));
[path curveToPoint:NSMakePoint(2*unit,-2*unit) controlPoint1:NSMakePoint(unit,0) controlPoint2:NSMakePoint(2*unit,-unit)];
[path curveToPoint:NSMakePoint(0,-4*unit) controlPoint1:NSMakePoint(2*unit,-3*unit) controlPoint2:NSMakePoint(unit,-4*unit)];
[path curveToPoint:NSMakePoint(-2*unit,-2*unit) controlPoint1:NSMakePoint(-unit,-4*unit) controlPoint2:NSMakePoint(-2*unit,-3*unit)];
@nolastan
nolastan / trapi-node
Created September 24, 2012 19:23
node.js taskrabbit api example
var action = {};
/////////////////////////////////////////////////////////////////////
// metadata
action.name = "oauth-taskrabbit-callback";
action.description = "";
action.inputs = {
"required" : ["code"],
"optional" : []
};
@nolastan
nolastan / gist:3691669
Created September 10, 2012 15:47
tr_python
# Use the py_oauth2 library
# https://github.com/liluo/py-oauth2
from py_oauth2 import oauth2
task_rabbit_client = oauth2.Client(TASK_RABBIT_KEY, TASK_RABBIT_SECRET,
site='https://taskrabbitdev.com',
authorize_url='https://taskrabbitdev.com/api/authorize',
token_url='https://taskrabbitdev.com/api/oauth/token',
header_format= 'OAuth %s')
task_rabbit_access = oauth2.AccessToken(client=task_rabbit_client, token=TASK_RABBIT_ACCESS_TOKEN, header_format= 'OAuth %s')
@nolastan
nolastan / trapi_callback
Created September 6, 2012 23:55
taskrabbit callback data example
{
"items" : [
{
"actor" : {
// user info: who made the offer
},
"created_at" : 1334797665,
"event_type" : "offer_sent", # or offer_made
"offer": {
// offer info
require 'rubygems'
require 'nokogiri'
@nolastan
nolastan / gemfile
Created May 6, 2011 03:21
Stan's gemfile
source 'http://rubygems.org'
gem 'rails', '3.0.7'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql'
# Use unicorn as the web server
stanford-rosenthals-macbook-pro:attendit stan$ bundle install
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/stan/.gem/ruby/1.8/specifications/erubis-2.6.6.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/stan/.gem/ruby/1.8/specifications/erubis-2.7.0.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/stan/.gem/ruby/1.8/specifications/rack-1.2.2.gemspec:10.
NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2011-10-01.
Gem::Specification#default_executable= called from /Users/stan/.gem/ruby/1.8/specifications/rake-0.8.7.gemspec:10.
NOTE:
@nolastan
nolastan / gist:fe69695d60cd04395c2e
Created June 19, 2015 19:25
Sketch.app – import styles from airtable
var doc = context.document;
var buttons = getButtons();
for (var i=0; i < buttons.length; i++) {
attrs = buttons[i].fields;
var button = createButton(attrs);
doc.currentPage().addLayers([button]);
}
function getButtons() {
var request = NSMutableURLRequest.new();