Skip to content

Instantly share code, notes, and snippets.

View sjbwylbs's full-sized avatar
🎯
Focusing wechat mall

Evan sjbwylbs

🎯
Focusing wechat mall
  • China Guangdong Shenzhen
View GitHub Profile
@sjbwylbs
sjbwylbs / installing_rails_31_on_mac_os_x_lion
Created August 28, 2011 23:52
Installing Ruby on Rails 3.1 for a clean install of Mac OS X 10.7 Lion
# This is a guide for how I installed rails 3.1 on a clean install of Mac OS X 10.7 Lion.
# There is no Warranty expressed, and I am not responsible for any issues that may arise from following this guide.
# Installing rails should be simple. I cringed at other peoples methods shared via Twitter.
# Keil Miller July 26, 2011
# Install RVM
$ bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# Load RVM into new shells
# As instructed from the above command, add the line stated to the very bottom of the following file
@sjbwylbs
sjbwylbs / MethodParamNamesScaner.java
Created March 10, 2012 16:20 — forked from wendal/MethodParamNamesScaner.java
获得方法形参名称列表(Java)
package org.nutz.lang.util;
import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.HashMap;
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := game_shared
LOCAL_MODULE_FILENAME := libgame
#traverse all the directory and subdirectory
define walk
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();