This file contains 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
//= require jquery | |
//= require support/expect | |
//= require support/sinon | |
//= require support/chai | |
//= require support/chai-jquery | |
//= require support/sinon-chai | |
//= require magic_lamp | |
//= require lodash | |
//= require application | |
//= require_self |
This file contains 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 hidden characters
[ | |
// Cursor Movement | |
// ⌃F Forward by words | |
{ "keys": ["alt+f"], "command": "move", "args": { "by": "wordends", "forward": true } }, | |
// ⌃B Backward by words | |
{ "keys": ["alt+b"], "command": "move", "args": { "by": "words", "forward": false } }, | |
// ⌃A Beginning of line (soft) | |
{ "keys": ["ctrl+a"], "command": "move_to", "args": { "to": "bol" } }, |
This file contains 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
// Readline style toggle comment | |
{ "keys": ["ctrl+forward_slash"], "command": "toggle_comment", "args": { "block": false } }, | |
// Readline fix select line up | |
{ "keys": ["ctrl+shift+p"], "command": "move", "args": { "by": "lines", "forward": false, "extend": true } }, | |
// Readline fix by word ends | |
{ "keys": ["alt+f"], "command": "move", "args": { "by": "word_ends", "forward": true } }, | |
{ "keys": ["alt+b"], "command": "move", "args": { "by": "word_ends", "forward": false } }, | |
// Readline fix select by word ends | |
{ "keys": ["shift+alt+b"], "command": "move", "args": { "by": "word_ends", "forward": false, "extend": true } }, | |
{ "keys": ["shift+alt+f"], "command": "move", "args": { "by": "word_ends", "forward": true, "extend": true } }, |
This file contains 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
(function() { | |
FakeAPI = { | |
users: [ | |
{ | |
id: 1, | |
user: "user@example.com", | |
badges: _.times(5, function(i) { | |
var id = i + 1; | |
return { | |
id: id, |
This file contains 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
# Colors | |
end="\033[0m" | |
black="\033[0;30m" | |
blackb="\033[1;30m" | |
white="\033[0;37m" | |
whiteb="\033[1;37m" | |
red="\033[0;31m" | |
redb="\033[1;31m" | |
green="\033[0;32m" | |
greenb="\033[1;32m" |
This file contains 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
var obj = { | |
id: 1, | |
whoami: function() { | |
return this.id; | |
} | |
}; | |
function callExternally(callback) { | |
this.id = 99; | |
return callback(); |
This file contains 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
beforeEach(function() { | |
this.addMatchers({ | |
toBeTrue: function() { | |
return this.actual === true; | |
}, | |
toBeFalse: function() { | |
return this.actual === false; | |
}, |
This file contains 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
function togglePanel() { | |
$(".panel").slideToggle(); | |
} | |
function doOtherStuff() { | |
// other stuff is done here | |
} | |
function handleArrowClick() { | |
togglePanel(); |
This file contains 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
function togglePanel() { | |
$(".panel").slideToggle(); | |
} | |
$('.arrow').on('click', togglePanel); |
This file contains 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
function togglePanel() { | |
$(".panel").slideToggle(); | |
} | |
$('.arrow').click(togglePanel); |