Skip to content

Instantly share code, notes, and snippets.

# Configs
config defaultToCurrentScreen true
config nudgePercentOf screenSize
config resizePercentOf screenSize
config secondsBetweenRepeat 0.1
config checkDefaultsOnLoad true
config focusCheckWidthMax 3000
config keyboardLayout qwerty
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
@hulufei
hulufei / fix-relative.css
Created December 5, 2012 09:30
Make fixed element relative some elements other than document
.page {
width: 40em;
}
.tip {
position: fixed;
left: 50%;
bottom: 0;
margin-left: 20em; /* $pageWidth / 2*/
}
@hulufei
hulufei / mask.css
Created August 10, 2012 13:11
Pure css for full window mask
.modal-mask {
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
background-color: #000;
opacity: 0.8;
}
@hulufei
hulufei / spine.ajax.update.howto.coffee
Created June 28, 2012 10:59
Spine Ajax update model handle
class User extends Spine.Model
@configure 'User', 'name'
@extend Spine.Model.Ajax
@url: '/save'
user = new User(name: 'test')
# 设定/save直接返回 {flag: 0}
user.save()
User.bind 'update', (item) ->