Skip to content

Instantly share code, notes, and snippets.

@sethherr
sethherr / Attempt 1
Created Feb 12, 2014
Trying to load Viddy data dump...
View Attempt 1
$ pg_restore --verbose --clean --no-acl --no-owner -d viddy latest.dump
pg_restore: connecting to database for restore
pg_restore: dropping MATERIALIZED VIEW DATA station_additions
pg_restore: dropping MATERIALIZED VIEW DATA current_stations
pg_restore: dropping FK CONSTRAINT station_updates_execution_id_fkey
pg_restore: [archiver (db)] Error while PROCESSING TOC:
pg_restore: [archiver (db)] Error from TOC entry 2742; 2606 16432 FK CONSTRAINT station_updates_execution_id_fkey ufasaucshs5ksb
pg_restore: [archiver (db)] could not execute query: ERROR: relation "public.station_updates" does not exist
Command was: ALTER TABLE ONLY public.station_updates DROP CONSTRAINT station_updates_execution_id_fkey;
@sethherr
sethherr / parse_json.py
Created Oct 21, 2014
Parse some JSON for the CWW
View parse_json.py
# This relies on chicago-classifications.json being in the
# same folder as this parse_json.py file
#
# It will then make a .tsv from the JSON stream
# Kickass, Mr. Fidino and @sethherr
import json
cww_json = open( "chicago-classifications.json", "r" )
@sethherr
sethherr / portland.html
Last active Aug 29, 2015
Portland bike thefts
View portland.html
<!DOCTYPE html>
<html>
<head>
<title>Data Layer: Styling</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="utf-8">
<style>
html, body, #map-canvas {
height: 100%;
margin: 0px;
@sethherr
sethherr / bikeindex.py
Last active Aug 29, 2015
Bike Index strategy for python flask social
View bikeindex.py
"""
Some information about OAuth on the Bike Index available, srys, still under development
https://github.com/bikeindex/omniauth-bike-index
"""
from social.backends.oauth import BaseOAuth2
class BikeIndexOAuth2(BaseOAuth2):
name = 'bikeindex'
ID_KEY = 'id'
@sethherr
sethherr / csv-manufacturers.csv
Last active Aug 29, 2015
Bicycling related manufacturers for Soulheart (from Bike Index)
View csv-manufacturers.csv
name website frame_maker open_year close_year logo_url
24seven http://www.leisurelakesbikes.com/bikes/bmx-bikes/b/24seven true
3G http://www.3gbikes.com/ true
3T
3rd Eye
3rensho true
45North
4ZA
6KU http://6kubikes.com true
9 zero 7 https://www.facebook.com/9Zero7Bikes true
View gist:2973831
{"created":1326853478,"data":{"object":{"amount":100,"amount_refunded":0,"card":{"address_country":null,"address_line1":null,"address_line1_check":null,"address_line2":null,"address_state":null,"address_zip":null,"address_zip_check":null,"country":"US","cvc_check":null,"exp_month":8,"exp_year":2013,"fingerprint":"yDYVpmGorv6HbB5u","id":"cc_00000000000000","last4":"4242","name":null,"object":"card","type":"Visa"},"created":1340205965,"currency":"usd","customer":null,"description":"MyFirstTestCharge(createdforAPIdocs)","disputed":false,"failure_message":null,"fee":0,"fee_details":[],"id":"ch_00000000000000","invoice":null,"livemode":false,"object":"charge","paid":true,"refunded":false}},"id":"evt_00000000000000","livemode":false,"object":"event","type":"charge.succeeded"}
WebhooksController parse stripe webhook should parse the data from the post
Failure/Error: post 'stripe', @example_success
JSON::ParserError:
757: unexpected token at '&data%5Bobject%5D%5Bamount%5D=100&data%5Bobject%5D%5Bamo
@sethherr
sethherr / gist:5796827
Created Jun 17, 2013
Error on cap deploy
View gist:5796827
RAILS_ENV=production be cap deploy
triggering load callbacks
* 2013-06-17 09:10:19 executing `production'
triggering start callbacks for `deploy'
* 2013-06-17 09:10:19 executing `multistage:ensure'
* 2013-06-17 09:10:19 executing `deploy'
* 2013-06-17 09:10:19 executing `deploy:update'
** transaction: start
* 2013-06-17 09:10:19 executing `deploy:update_code'
updating the cached checkout on all servers
View error compiling.sh
keymaps/keymap_145158258498reactor.c: In function 'matrix_init_user':
keymaps/keymap_145158258498reactor.c:37:1: warning: control reaches end of non-void function [-Wreturn-type]
};
^
keymaps/keymap_145158258498reactor.c: In function 'matrix_scan_user':
keymaps/keymap_145158258498reactor.c:61:1: warning: control reaches end of non-void function [-Wreturn-type]
};
^
ergodox_ez.c: In function 'matrix_init_user':
ergodox_ez.c:10:1: warning: control reaches end of non-void function [-Wreturn-type]
View keylist.tsv
Key Display Description Category c definition JS Keycode
A Alphabet KC_A 65
B Alphabet KC_B 66
C Alphabet KC_C 67
D Alphabet KC_D 68
E Alphabet KC_E 69
F Alphabet KC_F 70
G Alphabet KC_G 71
H Alphabet KC_H 72
I Alphabet KC_I 73
View keybase.md

Keybase proof

I hereby claim:

  • I am sethherr on github.
  • I am sethherr (https://keybase.io/sethherr) on keybase.
  • I have a public key ASCaHk980P7DhH3J5jIHPYH5WtDOXk6LGrpQ5a__n3pvkAo

To claim this, I am signing this object: