Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block scturtle

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
leoleozhu / git with
Last active Dec 21, 2016
use Git with proxy
View git with

install socat

sudo apt-get install socat

edit ~/.ssh/config

    proxycommand socat - PROXY:localhost:%h:%p,proxyport=8080

###If you want to use SOCKS proxy, edit it like this. host ProxyCommand socat - SOCKS:localhost:%h:%p,socksport=7070

View gist:5107998


Twitter for iPhone

Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU

Twitter for Android

Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys

Twitter for iPad

Consumer key: CjulERsDeqhhjSme66ECg
beala /
Created Aug 11, 2012
A command line argument parser using generators and co-routines.
Inspired by:
def parse_args(target):
"""A generator that parses a stream of arguments one character at a time.
As soon as a flag, or flag value pair ("-a" or "-a value") is processed
the pair is sent off as a tuple to the 'target' generator.
samueltardieu /
Created Nov 26, 2010
Solve the Pell equation
"""Compute solutions to the diophantine Pell equation x^2-D*y^2=1."""
import itertools
def pell (D):
"""Return the smallest integer set solving Pell equation
x^2-D*y^2=1 where x, D and y are positive integers. If there are no
solution (D is a square), return None.
>>> pell(3)
evansb / Parser.hs
Created Aug 11, 2014
3 lines Parser in Haskell (Line 9,11,12)
View Parser.hs
import Control.Monad.State.Lazy
import Control.Monad.Error
import Control.Monad.Identity
import Control.Applicative
import Data.Char
-- Begin parser
type Parser a = StateT String (ErrorT String Identity) a
You can’t perform that action at this time.