Skip to content
View .jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
View variables_case.js
##### 变量大小写的结论
* 构造器 Class、Object 用 TheSomeone // 先祖的权威
* 方法名称 doSomething // 动宾,够醒目
* 文件名称 the_file // 网络传输可能会忽略大小写、可读性
* 普通变量 some_variables // 可读性
[访问讨论现场](http://stackoverflow.com/questions/1008230/what-is-the-best-practice-casing-style-for-javascript-why)
View gfw.sh
https://autoproxy-gfwlist.googlecode.com/svn/trunk/gfwlist.txt
View weibo_ads_killer.js
// ==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
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
<!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 bundle_bug.sh
# 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
# 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
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
Something went wrong with that request. Please try again.