Skip to content

Instantly share code, notes, and snippets.

@wfalkwallace
wfalkwallace / rwdurl
Created March 22, 2016 01:28 — forked from zachleat/rwdurl
A command line utility to open a url with a bunch of different screen widths (and organize the windows).
# My Chrome developer profile is in the `Profile 1` directory, make sure to update with yours.
# Best on an ultra wide monitor.
function rwdurl() {
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(0,0);window.resizeTo(320,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(330,0);window.resizeTo(480,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(815,0);window.resizeTo(640,1395);window.location='$1';</script></body></html>"
open -n -g -a "Google Chrome" --args --new-window --profile-directory=Profile\ 1 --app="data:text/html,<html><body><script>window.moveTo(1460,0);window.resizeTo(800,1395);window.location='$1';</script></body></html>"
open -n
@wfalkwallace
wfalkwallace / categories.swift
Last active August 29, 2015 14:15
Codepath Yelp Filter Categories
let categories: [[String:String]] = [["name" : "Afghan", "code": "afghani"],
["name" : "African", "code": "african"],
["name" : "American, New", "code": "newamerican"],
["name" : "American, Traditional", "code": "tradamerican"],
["name" : "Arabian", "code": "arabian"],
["name" : "Argentine", "code": "argentine"],
["name" : "Armenian", "code": "armenian"],
["name" : "Asian Fusion", "code": "asianfusion"],
["name" : "Asturian", "code": "asturian"],
["name" : "Australian", "code": "australian"],
@wfalkwallace
wfalkwallace / 0_reuse_code.js
Last active August 29, 2015 14:12
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
Title file
@wfalkwallace
wfalkwallace / linger vagrant error
Last active August 29, 2015 14:00
vagrant error - linger
vagrant@precise32:/vagrant$ python app.py
Traceback (most recent call last):
File "app.py", line 29, in <module>
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ['DATABASE_URL']
File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
raise KeyError(key)
KeyError: 'DATABASE_URL'
vagrant@precise32:/vagrant$
#! /usr/bin/env python2
# Requires: PIL, colormath
#
# Improved algorithm now automatically crops the image and uses much
# better color matching
from PIL import Image, ImageChops
from colormath.color_objects import RGBColor
import argparse
import math