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
//1、关闭左边标签页: | |
//代码: | |
var tab = gBrowser.mCurrentTab.boxObject.previousSibling; | |
if(tab) gBrowser.removeTab(tab); | |
//2、关闭右边标签页: | |
//代码 |
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 | |
if [ `id -u` -ne 0 ] | |
then | |
echo "please run it by root" | |
exit 0 | |
fi | |
apt-get -y update | |
apt-get -y install pptpd || { |
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
sudo su | |
wget https://raw.github.com/fivesheep/chnroutes/master/chnroutes.py | |
python chnroutes.py -p linux | |
cp -a ip-pre-up /etc/ppp | |
chmod +x /etc/ppp/ip-pre-up | |
cp -a ip-down /etc/ppp/ip-down.d | |
chmod +x /etc/ppp/ip-down.d/ip-down | |
link:https://code.google.com/p/chnroutes/wiki/Usage |
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 | |
if [ $(id -u) != "0" ]; then | |
printf "Error: You must be root to run this tool!\n" | |
exit 1 | |
fi | |
clear | |
printf " | |
#################################################### | |
# # |
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 | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
set -e | |
# Must be a valid filename | |
NAME=shadowsocks_client | |
PIDFILE=/var/run/$NAME.pid | |
#This is the command to be run, give the full pathname | |
DAEMON=/opt/ShadowSPDY/bin/splocal |
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
import requests | |
import sys | |
import re | |
import urllib | |
cookie = {'PHPSESSID': 'phulssv3eg4bijf3cb423beve4'} | |
def get_lesson_urls(html): | |
urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', html) | |
return [url for url in urls if 'lesson' in url] |
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
################################# | |
# | |
# 本清单基于 ubuntu 12.04, | |
# 下个 ubuntu 的 LTS | |
# 发出来后,会相应更新这里的内容。我的目标是按步执行可以零错误完成安装。 | |
# 注意,本文件只是一个清单,不是一个可以安全执行的脚本 | |
# | |
################################# | |
# create a linode,login as root, and create a common user for all the tasks |
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
################################# | |
# | |
# 本清单基于 ubuntu 12.04, | |
# 下个 ubuntu 的 LTS | |
# 发出来后,会相应更新这里的内容。我的目标是按步执行可以零错误完成安装。 | |
# 注意,本文件只是一个清单,不是一个可以安全执行的脚本 | |
# | |
################################# | |
# create a linode,login as root, and create a common user for all the tasks |
NewerOlder