This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ============================================================================= | |
show the reference design as non-blocking overlay. | |
NOTE: Webkit-Browser only. Reference image needs to be flipped as | |
»box-reflect: right« & transform: scaleX(-1) do not play together. | |
========================================================================== */ | |
body:after { | |
content: ''; | |
display: block; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this works perfectly within Futon | |
regex_str = prompt('Databases that match the following pattern will be deleted ("*" for all)') | |
$.couch.allDbs({success:function(dbs){ | |
dbs.forEach( function(db) { | |
if (RegExp(regex_str).test(db)) { | |
$.couch.db(db).drop() | |
} | |
}) | |
}}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
"TypeError: number is not a function", | |
" at Number.CALL_NON_FUNCTION (native)", | |
" at Object.generateBacktrace (http://couch.minutes.local:4000/vendor/hoptoad.js:101:11)", | |
" at Object.generateXML (http://couch.minutes.local:4000/vendor/hoptoad.js:59:29)", | |
" at Object.notify (http://couch.minutes.local:4000/vendor/hoptoad.js:9:34)", | |
" at Meeting.attach_behaviors (http://couch.minutes.local:4000/javascripts/controllers/meetings/show.js:135:17)", | |
" at Meeting.render (http://couch.minutes.local:4000/javascripts/controllers/application.js:57:12)", | |
" at Meeting.initialize (http://couch.minutes.local:4000/javascripts/controllers/meetings/show.js:128:19)", | |
" at Meeting.<anonymous> (http://couch.minutes.local:4000/vendor/backbone.js:901:21)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# works exactly like `.bind()`, with the difference that it gets executed with a delay. | |
# Each time the event gets triggered again, the delay gets reset. | |
# | |
# based on: http://benalman.com/projects/jquery-throttle-debounce-plugin/ | |
# | |
# example: | |
# | |
# car = new Backbone.Model | |
# bind_triggered = debounce_triggered = 0 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "app", | |
"version": "0.0.1", | |
"dependencies": { | |
"serveup": "~0.0.2", | |
"hem": "~0.1.6", | |
"es5-shimify": "~0.0.1", | |
"json2ify": "~0.0.1", | |
"jqueryify": "~0.0.1", | |
"spine": "~1.0.5", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove all keys that will expire in less than 1 hour | |
redis-cli keys "*" | while read LINE ; do TTL=`redis-cli ttl $LINE`; if [ $TTL -le 3600 ]; then echo "Del $LINE"; RES=`redis-cli del $LINE`; fi; done; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// imagine ... | |
app.email.send({ | |
to : '[email protected]', | |
subject : 'Email Attachments', | |
body : { | |
text: 'Find the screenshot attached', | |
html: "This is how we do it:\n" | |
+ "{{ attachments['screenshot.png'] }}" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jasmine.Matchers.prototype.toBePromise = -> | |
this.actual.done && !this.actual.resolve | |
jasmine.Matchers.prototype.toBeRejected = -> this.actual.isRejected() | |
jasmine.Matchers.prototype.toBeResolved = -> this.actual.isResolved() | |
jasmine.Matchers.prototype.toBeResolvedWith = -> | |
expectedArgs = jasmine.util.argsToArray(arguments); | |
unless this.actual.done | |
throw new Error('Expected a promise, but got ' + jasmine.pp(this.actual) + '.'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 1. install www.phantomjs.org | |
# 2. set 'spec/specRunner.coffee' to where you put the phantom_specRunner.coffee file | |
# 3. set 'spec/specRunner.html' to where the jasmine html test page is located | |
$ phantomjs spec/specRunner.coffee spec/specRunner.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abusefilter | |
modify | |
Modify an abusefilter entry. Made by Abusefilter extension. | |
block | |
block | |
unblock | |
reblock |