Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sethherr
sethherr / gist:5796827
Created June 17, 2013 13:23
Error on cap deploy
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
{"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 / csv-manufacturers.csv
Last active August 29, 2015 14:23
Bicycling related manufacturers for Soulheart (from Bike Index)
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
@sethherr
sethherr / bikeindex.py
Last active August 29, 2015 14:09
Bike Index strategy for python flask social
"""
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 / portland.html
Last active August 29, 2015 14:08
Portland bike thefts
<!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 / parse_json.py
Created October 21, 2014 01:58
Parse some JSON for the CWW
# 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 / Attempt 1
Created February 12, 2014 15:01
Trying to load Viddy data dump...
$ 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;