Skip to content

Instantly share code, notes, and snippets.

@holys
holys / gist:4562794
Last active December 11, 2015 06:58
设置WDS
设置WDS
@holys
holys / gist:4547375
Last active December 11, 2015 04:48
practice *nix command line
touch
@holys
holys / misc
Created January 14, 2013 15:29
Misc stuff
wget -m http://developers.douban.com/wiki/\?title\=api_v2
@holys
holys / compute.c
Last active December 11, 2015 00:39
简单版makefile
#include <math.h>
double compute(double x, double y) {
return pow(x, y);
}
@holys
holys / exam
Last active December 11, 2015 00:29 — forked from anonymous/exam.txt
#!/bin/bash
main() {
clear
while true
do
cat <<- MENU
1) select
2) command
@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.
#!/usr/bin/env python
# -*- coding: utf8 -*-
import re
import requests
import urlparse
import MySQLdb
cookie = 'http://strs.gdufs.edu.cn/web'
base = 'http://202.116.194.117/'
@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