Skip to content

Instantly share code, notes, and snippets.

View boertel's full-sized avatar

Benjamin Oertel boertel

View GitHub Profile
@boertel
boertel / instagram.js
Created January 24, 2017 19:06
j/k for instagram
var index = 0;
function navigate(evt) {
var media = document.getElementsByTagName('article')[index];
if (media) {
index += (evt.key === 'j' ? 1 : (evt.key === 'k' ? -1 : 0));
media.scrollIntoView();
}
}
@boertel
boertel / snippet-startup-simulator.js
Created December 7, 2016 03:43
automate startup-simulator decision
function choose(choice) {
var method = 'pick' + choice.toUpperCase();
var win = api[method]();
nextTurn(win);
}
var threshold = {
valuation: 80,
happiness: 20,
time: 3

Keybase proof

I hereby claim:

  • I am boertel on github.
  • I am boertel (https://keybase.io/boertel) on keybase.
  • I have a public key whose fingerprint is A1F7 E44A 8AD6 36EC 969E 7D00 62AC 7951 C283 EAFD

To claim this, I am signing this object:

@boertel
boertel / about.html
Created October 28, 2016 21:28
load-templates
<h1>About</h1>
<p>blablablablablbalba</p>
charts = [
{
'key': 'foresults',
'title': 'Top Air Origins',
},
{
'key': 'horesults',
'title': 'Top Hotel Origins',
},
{
import xlsxwriter
workbook = xlsxwriter.Workbook('chart.xlsx')
worksheet = workbook.add_worksheet()
# Create a new Chart object.
chart = workbook.add_chart({'type': 'column'})
# Write some data to add to plot on the chart.
data = [
data = [
(u'Hotel', 623845.0, 10507872.0, 2.444045, 1.602584, 4.739698, 33.428416, 211.6, 999764.0, 1524705.0),
(u'Flight', 512888.0, 9279554.0, 4.990609, 1.35651, 6.048405, 32.275604, 0.0, 695738.0, 2559623.0
]
for d in data:
print d[0], d[1]
'''
@boertel
boertel / circle.yml
Created July 1, 2015 05:05
Circle CI: circle.yml
machine:
python:
version: 2.7.9
services:
- postgresql
- redis
environment:
DB_NAME: circle_ci
DB_USER: ubuntu
dependencies:
@boertel
boertel / ViewerStore.js
Last active August 29, 2015 14:16
Viewer
var pictures = [
'http://placehold.it/240x20',
'http://placehold.it/240x120',
'http://placehold.it/240x220',
'http://placehold.it/240x320',
'http://placehold.it/240x420'
];
var Dispatcher = require('./dispatcher'),
EventEmitter = require('events').EventEmitter,
@boertel
boertel / gspreadsheet.py
Created February 20, 2015 05:12
Google spreadsheet
import sys
import getpass
import gspread
class Worksheet(object):
def __init__(self, gc):
self.gc = gc