Skip to content

Instantly share code, notes, and snippets.

View hysios's full-sized avatar
🎯
Focusing

hysios hysios

🎯
Focusing
View GitHub Profile
zh-cn:
errors:
messages:
not_found: "没有找到"
already_confirmed: "已经确认"
not_locked: "没有锁定"
devise:
failure:
unauthenticated: '继续操作前请注册或者登录.'
unconfirmed: '请先激活您的帐号'
@hysios
hysios / gist:1007949
Created June 4, 2011 14:51
a parse array regexp for javascript
'[10,10,"asdf\\"a,s\\"df","的位图要求asdf",10,10]'.match(/(\d+(?=,?))|(('|")(.+?[^\\]\3)(?=,?))/g);
@hysios
hysios / gist:1240164
Created September 25, 2011 02:51
jQuery Placeholder Text
<script src="jquery.js"></script>
<script src="modernizr.js"></script>
<script>
$(document).ready(function(){
if(!Modernizr.input.placeholder){
$('[placeholder]').focus(function() {
var input = $(this);
@hysios
hysios / gist:1274735
Created October 10, 2011 06:19
shotgun start with thin
Using Thin and starting on port 6000 instead of 9393 (default):
shotgun --server=thin --port=6000 config.ru
豆瓣API key
你的豆瓣 API key:
074048b0e693229415c0da12b3b967bc
API key 的详细信息 · · · · · ·
私钥:f9d8832f4b383bce -请保护好你的私钥
应用名称:Test
应用url:http://localhost
创建时间: 2012-03-04
ni hao a
wrapError = (onError, model, options) ->
(resp) ->
if onError?
onError(model, resp, options);
else
model.trigger('error', model, resp, options)
apply: (name = null, options = {}) ->
name ||= @get('name')
success = options.success
wrapError = (onError, model, options) ->
(resp) ->
if onError?
onError(model, resp, options);
else
model.trigger('error', model, resp, options)
apply: (name = null, options = {}) ->
name ||= @get('name')
success = options.success
export POW_TIMEOUT=10000
export POW_WORKERS=3
export POW_TIMEOUT=10000
export POW_WORKERS=3