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
// 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 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
$("#foo") | |
.clone() //clone the element | |
.children() //select all the children | |
.remove() //remove all the children | |
.end() //again go back to selected element | |
.text(); |
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
U: Working file was updated | |
G: Changes on the repo were automatically merged into the working copy | |
M: Working copy is modified | |
C: This file conflicts with the version in the repo | |
?: This file is not under version control |
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 txt = $('.writer').text(); | |
var timeOut; | |
var txtLen = txt.length; | |
var char = 0; | |
$('.writer').text('|'); | |
(function typeIt() { | |
var humanize = Math.round(Math.random() * (200 - 30)) + 30; | |
timeOut = setTimeout(function() { | |
char++; | |
var type = txt.substring(0, char); |
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
ALTER TABLE tablename AUTO_INCREMENT = 1 |
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
First, this assumes you already launched Skype normally from the Application icon, and logged into the first Skype account. One method is to open a Terminal (console) window, change directories to the Skype application, then simply run a second instance using the sudo command: | |
Step 1: Open a Terminal window | |
Step 2: cd /Applications/Skype.app/Contents/MacOS/ | |
Step 3: sudo ./Skype | |
Now the second instance of Skype will launch, you will see trailing output in the console window. | |
Note: Do not close the window or it will force Skype to close. You may minimize the window if it's in the way. |
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
window.setTimeout(function(){location.reload()},3000) |
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
app.all('/', function(req, res, next) { | |
res.header("Access-Control-Allow-Origin", "*"); | |
res.header("Access-Control-Allow-Headers", "X-Requested-With"); | |
next(); | |
}); | |
app.get('/', function(req, res, next) { | |
// Handle the get for this route | |
}); |
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
$( document.body ).on( 'click', '.dropdown-menu li', function( event ) { | |
var $target = $( event.currentTarget ); | |
$target.closest( '.btn-group' ) | |
.find( '[data-bind="label"]' ).text( $target.text() ) | |
.end() | |
.children( '.dropdown-toggle' ).dropdown( 'toggle' ); | |
return 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
$ python -m SimpleHTTPServer 8888 |
OlderNewer