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
iptables -N sshban | |
iptables -A sshban -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name DEFAULT --rsource | |
iptables -A sshban -p tcp -m tcp --dport 22 -m state --state NEW -m recent --update --seconds 60 --hitcount 4 --name DEFAULT --rsource -j DROP |
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 python2 | |
# -*- coding:utf-8 -*- | |
import os | |
import sys | |
def ip62hex(ip): | |
ip = map(lambda x: int(x, 16), ip.split(':')) | |
hexed = reduce(list.__add__, | |
[[(x >> 8), (x & 0x00FF)] for x in ip]) |
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
[user] | |
name = bigeagle | |
email = justin.w.xd@gmail.com | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
interactive = auto | |
[alias] | |
co = checkout |
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 python2 | |
# -*- coding:utf8 -*- | |
import requests | |
import argparse | |
USERNAME="" | |
PASSWORD="" | |
BASE_URL="http://net.tsinghua.edu.cn/" |
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 python2 | |
# -*- coding:utf8 -*- | |
# ---------------- | |
# forked from dnspod official client | |
# modified by Justin Wong <bigeagle(at)xdlinux.info> | |
# License: MIT | |
# ---------------- | |
import httplib, urllib | |
import socket |
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 | |
############################## | |
# dnspodsh | |
# 基于dnspod api构架的bash ddns客户端 | |
# 作者:zrong(zengrong.net) | |
# 日期:2012-02-13 | |
############################## | |
login_email=${1:?'必须提供登录名'} |
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/python2 | |
# -*- encoding:utf8 -*- | |
import os | |
import urllib | |
import urllib2 | |
import time | |
import re | |
import eyeD3 | |
import argparse | |
urlread = lambda url: urllib2.urlopen(url).read() |
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
package main | |
import ( | |
"bufio" | |
"crypto/md5" | |
"crypto/rc4" | |
"encoding/base64" | |
"flag" | |
"fmt" | |
"io" |
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
tj ☯ | |
' 『 | |
' 』 | |
" “ | |
" ” | |
' ‘ | |
' ’ | |
0 零 | |
1 壹 |
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
if !exists("g:vimrc_loaded") | |
" 设置颜色主题为 molokai | |
colorscheme molokai | |
let g:molokai_original = 1 | |
if has("gui_running") | |
" 设置 gvim 的外观 | |
set guioptions-=T "隐藏工具栏 | |
set guioptions-=L | |
set guioptions-=r | |
set guioptions-=m |