Skip to content

Instantly share code, notes, and snippets.

View keepzero's full-sized avatar

KeepZero keepzero

View GitHub Profile
@keepzero
keepzero / abspath.sh
Created December 5, 2012 04:27
Get absolute path of this script
#!/bin/bash
# basename - strip directory and suffix from filenames
# dirname - strip last component from file name
ABSDIR=$(cd $(dirname "$0") > /dev/null; pwd)
ABSPATH=$(cd $(dirname "$0") > /dev/null; pwd)/$(basename $0)
echo $ABSDIR
echo $ABSPATH
@keepzero
keepzero / download.py
Created October 21, 2012 16:01
Download All Xiaobu Teacher's Videos
#!/usr/bin/python2
#下载小布老师的所有 Oracle 学习视频
#http://www.boobooke.com/bbs/thread-272667-1-1.html
import urllib2,urllib,re,sys,os,subprocess
from HTMLParser import HTMLParser
class MyHTMLParser(HTMLParser):
def __init__(self):
@keepzero
keepzero / cernet_list.txt
Created October 9, 2012 14:22
CERNET routes for Windows
1.51.0.0/16
1.184.0.0/15
42.244.0.0/14
49.52.0.0/14
49.120.0.0/14
49.140.0.0/15
49.208.0.0/15
58.154.0.0/15
58.192.0.0/12
59.64.0.0/12