Skip to content

Instantly share code, notes, and snippets.

@holys
holys / case.sh
Last active December 11, 2015 00:29 — forked from anonymous/case.sh.txt
#!/bin/bash
read -p "please input a file name:" file
cat <<- MENU
d or D:delete file
s or S:show file detail infomation
q or Q:quit
MENU
read -p "input your option:" option
#! /bin/sh
### BEGIN INIT INFO
# Provides: supervisord
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Example initscript
# Description: This file should be used to construct scripts to be
# placed in /etc/init.d.
@holys
holys / checklink.py
Created December 5, 2012 12:07 — forked from tonyseek/checklink.py
Visit all links of a website.
@holys
holys / gist:4103942
Created November 18, 2012 07:07 — forked from cuimuxi/gist:3719516
gevent crawler
import gevent
from gevent import monkey, queue
monkey.patch_all()
import urllib2
from time import sleep
import traceback
import logging
@holys
holys / proxy-with-white-list.pac
Created November 5, 2012 17:08 — forked from iwinux/proxy-pac.js
PAC that uses a white list
/*global isPlainHostName, isInNet*/
var proxy = "SOCKS5 127.0.0.1:9999; SOCKS 127.0.0.1:9999; DIRECT";
var noProxy = "DIRECT";
var localhosts = [
['192.168.0.0', '255.255.0.0'],
['10.0.0.0', '255.0.0.0'],
['172.0.0.0', '255.0.0.0'],
['127.0.0.0', '255.255.255.0']
];
@holys
holys / monssh.sh
Created November 5, 2012 17:06 — forked from iwinux/monssh.sh
monitor SSH status
#! /bin/bash
# usage: monssh [hostname]
if [[ -z $1 ]]
then
HOST="YOURHOST"
else
HOST=$1
fi
@holys
holys / .tmux.conf
Created November 5, 2012 17:02 — forked from iwinux/.tmux.conf
tmux.conf
# reference https://bitbucket.org/xuxiaodong/dotman/src/cb7f1e6fb338/.tmux.conf
set -g default-terminal "screen-256color"
set -g display-time 3000
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1
set -s escape-time 0
# key bindings
@holys
holys / rc.lua
Created November 5, 2012 16:55 — forked from iwinux/rc.lua
Awesome Configurations
require("awful") -- Standard awesome library
require("awful.autofocus")
require("awful.rules")
require("beautiful") -- Theme handling library
require("naughty") -- Notification library
beautiful.init("/home/winus/.cache/awesome/themes/zenburn/theme.lua")
terminal = "terminator"
@holys
holys / rc.conf
Created November 5, 2012 16:51 — forked from iwinux/rc.conf
#
# /etc/rc.conf - Main Configuration for Arch Linux
#
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="localtime"
TIMEZONE="Asia/Shanghai"
KEYMAP="us"
CONSOLEFONT="ter-v20b"
@holys
holys / gist:4015296
Created November 5, 2012 04:20 — forked from dreampuf/gist:3859636
双拼域名采集
#!/usr/bin/env python
#vim: encoding=utf-8
__author__ = "Dreampuf<soddyque@gmail.com>"
import subprocess
import itertools
dc = "a,ai,an,ang,ao,ba,bai,ban,bang,bao,bei,ben,beng,bi,bian,biao,bie,bin,bing,bo,bu,ca,cai,can,cang,cao,ce,cei,cen,ceng,cha,chai,chan,chang,chao,che,chen,cheng,chi,chong,chou,chu,chua,chuai,chuan,chuang,chui,chun,chuo,ci,cong,cou,cu,cuan,cui,cun,cuo,da,dai,dan,dang,dao,de,dei,den,deng,di,dia,dian,diao,die,din,ding,diu,dong,dou,du,duan,dui,dun,duo,e,ei,en,eng,er,fa,fan,fang,fei,fen,feng,fiao,fo,fou,fu,ga,gai,gan,gang,gao,ge,gei,gen,geng,gong,gou,gu,gua,guai,guan,guang,gui,gun,guo,ha,hai,han,hang,hao,he,hei,hen,heng,hm,hng,hong,hou,hu,hua,huai,huan,huang,hui,hun,huo,ji,jia,jian,jiang,jiao,jie,jin,jing,jiong,jiu,ju,juan,jue,jun,ka,kai,kan,kang,kao,ke,kei,ken,keng,kong,kou,ku,kua,kuai,kuan,kuang,kui,kun,kuo,la,lai,lan,lang,lao,le,lei,leng,li,lia,lian,liang,liao,lie,lin,ling,liu,lo,long,lou,lu,luan,lun,luo,lüe,lǘ,lǚ,lǜ,ma,mai,man,mang,mao,me,mei,men,meng,mi,mian,miao,mie,min,ming,miu,mo,mo