Skip to content

Instantly share code, notes, and snippets.

View ninehills's full-sized avatar

Tao Yang ninehills

View GitHub Profile
@ninehills
ninehills / gateway.sh
Created November 23, 2010 16:16
南开大学网关自动登录脚本
#!/bin/bash
#-------------------------------
# 南开大学网关自动登录脚本
# 用法请用help命令查询
# 支持ipv4/ipv6登录
# 作者:cynic<cynic AT 9hills.us>
# 网站:http://9hills.us
# cygwin下测试通过
#-------------------------------
@ninehills
ninehills / rename
Created December 4, 2010 05:57
linux批量重命名
for i in *.jpeg;do mv "$i" "${i%.jpeg}.jpg" ;done
server {
listen 80;
server_name 9hills.us;
access_log /var/log/nginx/9hills.us.access.log;
root /var/www/wordpress;
## Default location
location / {
index index.html index.php;
#WP Permalinks rewrite
@ninehills
ninehills / setip.bat
Created January 10, 2011 18:50
为各个不同环境设置电脑ip,环境:win7中文版,需要管理员权限运行
@echo off
choice /C 1234 /M "Please Enter Your Environment:(1-Hostel_WLAN, 2-Hostel_LAN,3-5J108, 4-5J315)"
if errorlevel 4 goto Room315
if errorlevel 3 goto Room108
if errorlevel 2 goto Hostel_LAN
if errorlevel 1 goto Hostel_WLAN
:Room315
netsh interface ip set address name="无线网络连接" source=dhcp
#!/bin/sh
xmodmap - <<EOF
remove Lock = Caps_Lock
keysym Escape = Caps_Lock
keysym Caps_Lock = Escape
add Lock = Caps_Lock
EOF
We couldn’t find that file to show.
@ninehills
ninehills / delay
Created March 9, 2011 10:32
Linux下用来延时执行命令的小脚本
#!/bin/bash
# 参数1:延迟的时间,单位s
# 参数2:需要执行的命令
# example:
# delay 10 "conky -d"
sleep $1
exec $2
upstream ghs {
ip_hash;
server ghs.google.com;
server 72.14.203.121;
server 72.14.207.121;
server 74.125.43.121;
server 74.125.47.121;
server 74.125.53.121;
server 74.125.77.121;
server 74.125.93.121;
@ninehills
ninehills / PKGBUILD
Created April 15, 2011 15:05
libqq-svn 161 PKGBUILD
pkgname=libqq-svn
pkgver=161
pkgrel=1
arch=('i686' 'x86_64')
url="http://code.google.com/p/libqq-pidgin/"
pkgdesc="Latest QQ 2010 protocol for pidgin"
license=('GPLv3')
depends=()
makedepends=('libpurple')
conflicts=('libqq-pidgin')
@ninehills
ninehills / setip.bat
Created May 24, 2011 12:05
Windows IP 快速切换脚本
@echo off&color 1E&title IP地址快速切换器
echo ┌────────────────────────────┐
echo | |
echo | 切换网络环境,请输入当前所在位置 │
echo | |
echo └────────────────────────────┘
:choice
set choice=
set /p choice=【实验室无线】请选择1,【实验室有线】请选择2,【宿舍无线】请选择3,【宿舍有线】请选择4:[1,2,3,4]?