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/python | |
#coding=utf8 | |
import urllib | |
import sys | |
import re | |
import xml.dom.minidom as xml | |
API_URL = 'http://dict.cn/ws.php?utf8=true&q=%s' | |
#API_URL = 'http://dict-co.iciba.com/api/dictionary.php?w=%s' | |
def getword(word): |
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 | |
#屏幕截图,截取选择区域到 SCRDIR 目录 | |
NOW=`date '+%Y-%m-%d-%H-%M-%S'` | |
if [ -z $2 ]; then | |
FNAME=screenshot-${NOW} | |
else | |
FNAME="[$2]-${NOW}" | |
fi | |
EXT=png |
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/expect | |
set timeout 60 | |
spawn /usr/bin/ssh -D 7070 -g [email protected] | |
#这里的 username 为你自己的用户名,yourserver.com 为你自己的服务器域名或ip | |
expect { | |
"password:" { | |
send "password\r" | |
#将第二个 password 改为你自己的密码 | |
} |
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
<?php | |
require("sql.php"); | |
//确保在连接客户端时不会超时 | |
set_time_limit(0); | |
//设置IP和端口号 | |
$address = 'localhost'; | |
$port = 2009; |
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 | |
mplayer `curl $@ |egrep -o "ftp.*(rmvb|avi|mkv)"` -cache 8192 |
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
<!DOCTYPE html> | |
<html lang="zh-CN"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>OLIVIDA Start Page</title> | |
<link rel="stylesheet" type="text/css" media="screen" href="/static/css/style.css" /> | |
<link rel="shortcut icon" href="/static/img/favicon.ico" /> | |
</head> | |
<body> | |
<div id="Root"><div style="float: right"><a href="https://mail.google.com/" target="_blank">Gmail</a> <a href="https://www.google.com/reader" target="_blank">Reader</a> <a href="https://www.google.com/analytics" target="_blank">Analytics</a> <a href="https://www.google.com/adsense" target="_blank">AdSense</a> <a href="https://www.instapaper.com/" target="_blank">Instapaper</a></div> |
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 | |
""" | |
A pure python ping implementation using raw socket. | |
Note that ICMP messages can only be sent from processes running as root. | |
Derived from ping.c distributed in Linux's netkit. That code is |
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
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 一般设定 | |
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" | |
" 设定主题 | |
colo evening | |
" 设定默认解码 | |
set fenc=utf-8 | |
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936 |
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 | |
# Ubuntu下的截图脚本,为其设置一个快捷键即可 | |
# 来自:http://forum.ubuntu.org.cn/viewtopic.php?f=120&t=125239 | |
NOW=`date '+%Y-%m-%d-%H-%M-%S'` | |
if [ -z $2 ]; then | |
FNAME=screenshot-${NOW} | |
else | |
FNAME="[$2]-${NOW}" |
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 | |
USER=user #账号 | |
PASS=pass #密码 | |
GATE=https://202.113.18.188 | |
GATELOGOUT=https://202.113.18.188/F.htm #网关登出地址 | |
if [ "$1" = "login" ]; | |
then |
OlderNewer