This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
twitter.com | |
facebook.com | |
youtube.com | |
youtu.be | |
ggpht.com | |
gstatic.com | |
googlesyndication.com | |
googlevideo.com | |
ytimg.com | |
google.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Update latest epel | |
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
sudo rpm -Uvh epel-release-6-8.noarch.rpm | |
yum --enablerepo=epel install mosh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
push creates new remote head on branch | |
from time to time, `hg push` throws this message | |
I'm pretty sure that no code needs to be merged. | |
`hg push -b yourbranch` solve this | |
and I don't care why. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set sw=4 ts=4 sta et sts=4 ai | |
set nu | |
set guifont=Inconsolata\ Medium\ 12 | |
syntax on | |
colorscheme slate | |
nmap <F8> :TagbarToggle<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
checkalive (){ | |
NODE=$1 | |
ping -c 3 $NODE>/dev/null 2>&1 | |
if [ $? -eq 0 ] | |
then | |
echo "$NODE is alive" | |
else | |
echo "$NODE is not alive" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:utf-8 | |
import re | |
import sys | |
import urllib2 | |
std_headers = { | |
'User-Agent': 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101028 Firefox/3.6.12', | |
'Accept-Charset': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7', | |
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', | |
'Accept-Language': 'en-us,en;q=0.5', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#coding:utf-8 | |
#use example: | |
# find|python /tmp/myfind.py sth | |
# on cygwin | |
# find|python "C:\Users\user1\findtext\myfind.py" sth | |
import re |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# quoted from http://www.wkoorts.com/wkblog/2008/10/27/python-proxy-client-connections-requiring-authentication-using-urllib2-proxyhandler/ | |
# urllib2_proxy_handler.py | |
# | |
# Author: Wayne Koorts | |
# Date: 27/10/2008 | |
# | |
# Example for using urllib2.urlopen() with a proxy server requiring authentication | |
import urllib2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#coding:utf-8 | |
suffix_list = ['.cpp','.c','.h','.hpp','.txt','.html','.htm','.xml','.py'] | |
def FoundInvalidFile(input_folder):#str,list | |
def calc_bom(str1): | |
rt = '' | |
for i in range(0,3): | |
rt += '%02X'%(ord(str1[i])) | |
return rt |
OlderNewer