Skip to content

Instantly share code, notes, and snippets.


Idan Gazit idan

Block or report user

Report or block idan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bendc / functional-utils.js
Last active Mar 18, 2020
A set of pure ES2015 functions aimed to make functional JavaScript more idiomatic.
View functional-utils.js
// 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)
mbostock / .block
Last active May 7, 2020
Gist API Latency
View .block
license: gpl-3.0
danparsons / gist:3195652
Created Jul 29, 2012
How to stream the London 2012 Olympics
View gist:3195652

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.

ib-lundgren / gist:2584789
Created May 3, 2012
OAuth1 using requests, OAuthLib and RSA signatures
View gist:2584789
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
key = open("your_rsa_key.pem").read()
idan /
Created May 2, 2012
Requests + OAuth, sample usage
import requests
from requests.auth import OAuth1
url = u''
client_key = u'...'
client_secret = u'...'
resource_owner_key = u'...'
resource_owner_secret = u'...'
jacobian /
Created May 1, 2012
Install a package from your local pip download cache without touching the 'net.
#!/usr/bin/env python
Install a package from your local pip download cache without having to touch
the 'net at all.
You'll need to be using a pip download cache; that is, you'll need the
following in your ~/.pip/pip.cfg:
datagrok / gist:2199506
Last active Jan 7, 2020
Virtualenv's `bin/activate` is Doing It Wrong
View gist:2199506
ryangomba /
Last active Mar 9, 2020
OPTICS clustering in Python
# Copyright (c) 2012, Ryan Gomba
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
jezdez /
Created Aug 25, 2011
A helper script to apply patches from Django's trac
#!/usr/bin/env python
Obviously this is only useful if you have to deal with Django's
Trac a lot.
Mostly stolen from Jacob Kaplan-Moss, but improved by Jannis Leidel
and Aymeric Augustin.
Reads a config file at ~/.djpatchrc, e.g.:
You can’t perform that action at this time.