Skip to content

Instantly share code, notes, and snippets.

View ninehills's full-sized avatar

Tao Yang ninehills

View GitHub Profile
@ninehills
ninehills / PKGBUILD
Created December 30, 2011 16:23
minus-uploader 1.7-5 PKGBUILD
# Maintainer: Giorgio Gilestro <[email protected]>
pkgname="minus-uploader"
pkgver="1.7"
pkgrel=5
pkgdesc="Desktop app that allows you to drag-n-drop files into the taskbar and instantly upload to Minus"
url="https://minus.com/pages/tools"
license=('GPL')
arch=('i686' 'x86_64')
@ninehills
ninehills / 12306.user.js
Created January 7, 2012 08:24 — forked from quietlynn/12306.user.js
12306 Auto Query => A javascript snippet to help you book ticket
/*
12306 Auto Query => A javascript snippet to help you book tickets online.
Copyright (C) 2011 Jingqin Lynn
Includes jQuery
Copyright 2011, John Resig
Dual licensed under the MIT or GPL Version 2 licenses.
http://jquery.org/license
Includes Sizzle.js
@ninehills
ninehills / OSX.ini
Created April 23, 2012 01:35
MacType OSX.ini
; ----------------------------------------------------------------------
; XMac
; (Only for MacType, NOT SUPPORT THE OLD VERSION OF GDI++/HE)
;
; [email protected]
; QQ Group: 18988755
; ----------------------------------------------------------------------
[Preview]
Font=XHei OSX
@ninehills
ninehills / supervisord.sh
Created April 28, 2012 02:11 — forked from danmackinlay/supervisord.sh
an init.d script for supervisord
#! /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.
@ninehills
ninehills / wr703n-openwrt.md
Last active October 26, 2025 18:48
WR703N OpenWrt 配置流程

WR703N OpenWrt 配置流程

下载安装

访问WR703N在OpenWrt的[Wiki页][wr703n-openwrt],然后在Flashing一节中找到下载链接:[squashfs-factory.bin][flash.bin],下载后别忘了[比对md5][md5sum]。[1]

进入路由器管理界面,出厂配置为http://192.168.1.1,用户名和密码均为admin,然后进入固件更新,选择下载的文件,然后更新。

@ninehills
ninehills / .vimrc
Created July 28, 2012 04:39
最小vimrc
set nocompatible
syntax enable
set encoding=utf-8
set showcmd " display incomplete commands
filetype plugin indent on " load file type plugins + indentation
"" Whitespace
set nowrap " don't wrap lines
set tabstop=2 shiftwidth=2 " a tab is two spaces
set expandtab " use spaces, not tabs
@ninehills
ninehills / new_bashrc.sh
Created August 11, 2012 10:09 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@ninehills
ninehills / check_google_ip.py
Created August 25, 2012 10:37
check_google_ip
#!/usr/bin/env python
# coding:utf-8
import sys
import os
import re
import gevent
import gevent.monkey
import gevent.timeout
gevent.monkey.patch_all()
@ninehills
ninehills / .screenrc
Created September 5, 2012 05:56
screenrc example
#close the startup message
startup_message off
term linux
setenv LC_CTYPE zh_CN.GBK
setenv TERM linux
#set a biger buffer
#defscrollback 1024
defscrollback 2048
caption always "%{=u .r} %-w%<%{=ub .Y}%n %t%{=u .r}%+w "
@ninehills
ninehills / sh_window.sh
Created September 13, 2012 13:25
并行执行文件中的命令的shell脚本
#!/bin/sh
# Usage: $0 <max_cmd> <cmdfile/stdin>
# max_cmd: 同时执行的命令数
# cmdfile/stdin: 标准输入或者命令文件,一条命令一行
set -u
max_cmd=$1
cmd_file=${2:--}
cur=0
line=1
for ((;;)) do