panfu panfu

View gfw.sh
1
https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
View weibo_ads_killer.js
1 2 3 4 5 6 7 8 9 10
// ==UserScript==
// @name 铲除一切害人虫
// @description 移除我想移除,留下我想留下
// @match http://weibo.com/*
// @match http://*.weibo.com/*
// @match http://t.sina.com.cn/*
// @version 1.0
// ==/UserScript==
 
// 在这里添加你想要去掉的dom的id
View md5 fool me.coffee
1 2 3 4 5 6 7 8 9 10
crypto = require('crypto')
md5_url = (url) -> crypto.createHash('md5').update(url).digest("hex")[0..6]
 
h = {}
a = []
for r in [1..100000]
z = md5_url(Math.random() + '')
if !h[z]
a.push z
h[z] = 1
View colorful.html
1 2 3 4 5 6 7 8 9 10
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>COLORFUL</title>
<script src="/jquery-1.js" type="text/javascript" charset="utf-8"></script>
<script src="/modernizr.js" type="text/javascript" charset="utf-8"></script>
<script src="/mustache.js" type="text/javascript" charset="utf-8"></script>
<script>
View 又爱又恨的正则
1
url\(\"(.*?)/(\w+.png)\"\) #=> url("../images/$2")
View bundle_bug.sh
1 2 3
# This is probably because you have a too recent version of bundler installed. Integrity v22 is not compatible with bundler > 0.9, but relies on functionality that was in removed in the subsequent version. In my case I installed bundler 0.9 before I ran bundle install:
 
gem install bundler --version=0.9
View Textmate bundles
1 2 3 4 5 6 7 8 9 10
# Textmate essential bundles
 
cd ~/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles
# mkdir -p cd /Applications/TextMate.app/Contents/SharedSupport/Bundles
git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
git clone git://github.com/textmate/ruby-haml.tmbundle.git
git clone git://github.com/seaofclouds/sass-textmate-bundle.git "Ruby Saas.tmbundle"
git clone git://github.com/bmabey/cucumber-tmbundle.git Cucumber.tmbundle
git clone git://github.com/karnowski/blue-ridge-tmbundle.git JavaScript\ Blue\ Ridge.tmbundle
git clone git://github.com/johnmuhl/nginx-tmbundle.git nginx.tmbundle
View new_git.sh
1 2 3 4 5 6 7 8 9 10
Global setup:
Download and install Git
git config --global user.name "panfu"
git config --global user.email panfu.gz@gmail.com
Next steps:
mkdir mochiweb_example
cd mochiweb_example
git init
touch README
View .emacs
1 2 3 4 5 6 7 8 9
(global-set-key "\C-c\C-d" "\C-a\C- \C-n\M-w\C-y")
 
;; (menu-bar-mode 0)
(tool-bar-mode 0)
(define-key global-map [menu-bar tools] nil)
 
 
(add-to-list 'load-path "~/emacs")
(require 'my_config)
View chef-install-snow-leopard.sh
1 2 3 4 5 6 7 8 9 10
# chef-server as ssh tunnel (reverse-proxy) for Mac OS X 10.6 SL
# Based loosely on Readme.rdoc - http://github.com/opscode/chef/
 
# port install CouchDB (may be broken on Snow Leopard)
sudo port install couchdb-devel
sudo launchctl load -w /Library/LaunchDaemons/org.apache.couchdb.plist
sudo launchctl unload -w /Library/LaunchDaemons/org.apache.couchdb.plist
# check for Trace/BPT trap error
couchdb
CTRL ^C
Something went wrong with that request. Please try again.