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
function mysql_real_escape_string (str) { | |
return str.replace(/[\0\x08\x09\x1a\n\r"'\\\%]/g, function (char) { | |
switch (char) { | |
case "\0": | |
return "\\0"; | |
case "\x08": | |
return "\\b"; | |
case "\x09": | |
return "\\t"; | |
case "\x1a": |
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
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
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
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
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
$("#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
// 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
This is done by running the git update-index --assume-unchanged path/to/file.txt command. Once marking a file as such, git will completely ignore any changes on that file; they will not show up when running git status or git diff, nor will they ever be committed. | |
To make git track the file again, simply run | |
git update-index --no-assume-unchanged path/to/file.txt. | |
https://help.github.com/articles/ignoring-files |