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
//A (Correct) | |
var AppointmentList = Backbone.Collection.extend({ | |
model: Appointment, | |
initialize: function(){ | |
this.on('remove',this.hideModel); | |
}, | |
hideModel: function(model){ | |
model.trigger('hide'); | |
} | |
}); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
#!/bin/bash | |
# nested-loop.sh: Nested "for" loops. | |
outer=1 # Set outer loop counter. | |
# Beginning of outer loop. | |
for a in 1 2 3 4 5 | |
do | |
echo "Pass $outer in outer loop." | |
echo "---------------------" |
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
inside: myproj.sublime-project: | |
{ | |
"folders": | |
[ | |
{ | |
"follow_symlinks": true, | |
"path": "D:\\www\\myproj" | |
} | |
], | |
"settings": { |
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
<?php | |
App::uses('AppHelper', 'View/Helper'); | |
class BootstrapHelper extends AppHelper { | |
public $helpers = array('Html'); | |
/** | |
* navLi: adds a li item with a link | |
* |
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
# ssh-keygen | |
then copy it on the server with one simple command: | |
# ssh-copy-id hostname | |
you can now log in without password: | |
# ssh hostname |