Skip to content

Instantly share code, notes, and snippets.

View idan's full-sized avatar
💫
Prototypin'

Idan Gazit idan

💫
Prototypin'
View GitHub Profile
@ib-lundgren
ib-lundgren / gist:2584789
Created May 3, 2012 09:52
OAuth1 using requests, OAuthLib and RSA signatures
import requests
from requests.auth import OAuth1
from oauthlib.oauth1.rfc5849 import SIGNATURE_RSA
client_key = u'...'
# You need to register your key with the OAuth provider first,
# in this case Google at https://accounts.google.com/ManageDomains
key = open("your_rsa_key.pem").read()
@danparsons
danparsons / gist:3195652
Created July 29, 2012 01:46
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.

@mbostock
mbostock / .block
Last active October 19, 2020 23:31
Gist API Latency
license: gpl-3.0
@bendc
bendc / functional-utils.js
Last active September 15, 2023 12:12
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
// array utils
// =================================================================================================
const combine = (...arrays) => [].concat(...arrays);
const compact = arr => arr.filter(Boolean);
const contains = (() => Array.prototype.includes
? (arr, value) => arr.includes(value)
: (arr, value) => arr.some(el => el === value)