Skip to content

Instantly share code, notes, and snippets.

View ryonlife's full-sized avatar

Ryan McKillen ryonlife

  • Miami, Florida, United States
View GitHub Profile
@ryonlife
ryonlife / autointegration_pipeline.py
Last active May 19, 2020 19:29
scrapy-autointegration
# -*- coding: utf-8 -*-
import os
import shutil
import time
import yaml
from pegbot.utils import get_project_root
@ryonlife
ryonlife / app.html
Last active December 28, 2015 04:39 — forked from Whoaa512/app.html
<body>
{{#constant}}
<div id="fb-root"></div>
{{/constant}}
<div> {{> fb_pic}} {{loginButtons}}</div>
<br />
<div><h2>Click to post to your feed:</h2> {{> feed}} </div>
</body>
@ryonlife
ryonlife / braintree_mongo_collection.js
Created February 9, 2012 01:36
Creates a capped collection for Braintree logging.
// cat schema/schema-create.js | mongo production # where `production` is the name of the database
db.createCollection('braintree', {capped: true, size: 1024*1024*1024});
@ryonlife
ryonlife / braintree_patch.py
Created February 9, 2012 00:42
Monkey patch Braintree's Python API wrapper so results/responses are serializable.
from types import MethodType
import braintree
import jsonpickle
import json
def serialize(self):
""" Serialize a Braintree SuccessfulResult or ErrorResult object to a Python dict """
return json.loads(jsonpickle.encode(self))
braintree.ErrorResult.serialize = MethodType(serialize, None, braintree.ErrorResult)
@ryonlife
ryonlife / touch_gitignore.sh
Created January 10, 2010 20:35
Touch a .gitignore file in all empty directories except the .git folder.
find . \( -type d -empty \) -and \( -not -regex ./\.git.* \) -exec touch {}/.gitignore \;
@ryonlife
ryonlife / iphone_3.0.1_user_agent.xml
Created August 19, 2009 16:48
Chris Pederick wrote the excellent User Agent Switcher extension for Firefox. The included iPhone user agent differs from an actual iPhone (more than just version number). Import this XML file from the extensions preferences dialog to use the correct iPho
<useragentswitcher><useragent description="iPhone 3.0.1" useragent="Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16" appcodename="Mozilla" appname="Netscape" appversion="5.0 (iPhone; U; CPU iPhone OS 3_0_1 like Mac OS X; en-us) AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A400 Safari/528.16" platform="iPhone" vendor="Apple Computer, Inc." vendorsub=""/></useragentswitcher>