Skip to content

Instantly share code, notes, and snippets.

View henrysher's full-sized avatar
💭
I may be slow to respond.

Henry Huang henrysher

💭
I may be slow to respond.
View GitHub Profile
<local>,0.0.0.0/0,*.dev,*bj*.*,*51*.*,*91*.*,*ali*.*,*.cn*.*,*.cn,*china*.*,*0-6.com,*000dn.com,*000wan.com,*007.mx,*007ok.cc,*00base.com,*010lm.com,*010time.com,*016788.com,*01happy.com,*01hr.com,*01lm.com,*01shangwu.com,*020883.com,*021025.com,*022net.com,*022show.com,*023dg.com,*025tata.com,*02753.com,*027art.com,*028search.com,*028share.com,*029gc.net,*0371gt.com,*0394dk.com,*03964.com,*03wx.com,*05120512.com,*0512118114.com,*0512kd.com,*0531.com,*0532gc.com,*0532gcw.com,*0551bike.com,*0566che.com,*0569.com,*0574shop.com,*0577bike.com,*0577men.com,*0577net.com,*0577wh.com,*057s.com,*0592sl.com,*0595.com,*0598yu.com,*05jk.com,*05sun.com,*05wan.com,*060s.com,*061100.com,*0622jj.com,*06621.com,*0669.cc,*06climate.com,*07073.com,*0713hb.com,*071711.com,*0737mp.com,*075501.com,*0817cg.com,*08279.com,*0830bbs.com,*0931007.com,*09dy.com,*0x110.com,*1000chi.com,*1000eb.com,*10010.com,*10010js.com,*10086.com,*100che.org,*100ksw.com,*100ksw.net,*100tm.com,*100ydy.com,*100ye.com,*100yue.com,*10628106.com,*107cine.co
tutorials = [('Mining Social Web APIs with IPython Notebook', 'Novice'),
('A hands-on introduction to Python for beginning programmers', 'Novice'),
('How to formulate a (science) problem and analyze it using Python code', 'Novice'),
('0 to 00111100 with web2py', 'Novice'),
('Getting Started with Django, a crash course', 'Novice'),
('Django for Web Designers and Front End Developers ', 'Novice'),
('Python 3/2 Web Development with Pyramid', 'Novice'),
('Introduction to game programming', 'Novice'),
('Hands-on Beginning Python', 'Novice'),
('TDD for web applications, from scratch', 'Novice'),
@henrysher
henrysher / 0_reuse_code.js
Created July 23, 2014 04:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@henrysher
henrysher / TwentyBot
Last active August 29, 2015 14:21 — forked from CodyWalker/TwentyBot
function countPieces() {
it = b.pieces();
var i = 0;
while (it.current()){ i++; it.next() }
return i;
}
function getRandPiece() {
var it = b.pieces();
var n = Math.floor(Math.random()*countPieces());
@henrysher
henrysher / uri_validate.py
Created December 26, 2011 08:40 — forked from mnot/uri_validate.py
uri_validate.py: Validation regex for URIs, URI references, and relative URIs
#!/usr/bin/env python
"""
Regex for URIs
These regex are directly derived from the collected ABNF in RFC3986
(except for DIGIT, ALPHA and HEXDIG, defined by RFC2234).
They should be processed with re.VERBOSE.
"""
@henrysher
henrysher / TestingUploadSe2Sauce.java
Created February 3, 2012 07:59 — forked from santiycr/TestingUploadSe2Sauce.java
Remote File Upload using Selenium 2's FileDetectors
import junit.framework.Assert;
import junit.framework.TestCase;
import org.openqa.selenium.*;
import org.openqa.selenium.remote.*;
import java.net.URL;
import java.util.concurrent.TimeUnit;
public class TestingUploadSe2Sauce extends TestCase {
private RemoteWebDriver driver;
@henrysher
henrysher / tag_instance.py
Created February 9, 2012 05:08 — forked from garnaat/tag_instance.py
Add a new/value tag to an instance
>>> import boto
>>> c = boto.connect_ec2()
>>> reservations = c.get_all_instances()
>>> reservations
[Reservation:r-b73716d6]
>>> instance = reservations[0].instances[0]
>>> instance
Instance:i-366c4354
>>> instance.tags
{}
@henrysher
henrysher / LICENSE.txt
Created February 20, 2012 14:22 — forked from aemkei/LICENSE.txt
Binary Tetris - 140byt.es
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@henrysher
henrysher / gistie.rb
Created April 22, 2012 02:51 — forked from martinisoft/gistie.rb
command-line posting to gist
#!/usr/bin/env ruby
# Made by Pieter de Bie <frimmirf@gmail.com>
# Based on a "Pastie" task by someone
require "tempfile"
GIST_URL = 'http://gist.github.com/gists'
GIST_LOGIN_URL = 'https://gist.github.com/session'
USERNAME = "martinisoft"
TOKEN = "6ef8395fecf207165f1a82178ae1b984"
@henrysher
henrysher / windows.h__.js
Created November 19, 2012 06:07
windows.h.js INFINITY
var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];