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() { | |
// Handler for .ready() called. | |
}); |
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
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
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
$ sudo chown -R $USER /usr/local |
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
// http | |
var http = require('http'); | |
var server = http.createServer(function (req, res) { | |
// optional, for HSTS | |
// see https://en.wikipedia.org/wiki/HTTP_Strict_Transport_Security | |
res.setHeader('Strict-Transport-Security', 'max-age=8640000; includeSubDomains'); | |
if (req.headers['x-forwarded-proto'] !== 'https') { | |
var url = 'https://' + req.headers.host + '/'; |
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
localStorage.setItem('favoriteflavor','vanilla'); | |
var taste = localStorage.getItem('favoriteflavor'); | |
localStorage.removeItem('favoriteflavor'); |
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
# Install git | |
sudo apt-get install git-core | |
# Set name for git to use when you commit | |
git config --global user.name "Your Name Here" | |
# Set email for git to use when you commit | |
git config --global user.email "[email protected]" | |
# Generate SSH deploy keys by following the instructions at: |
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
perl -pi -e 's/\Q$_// if ($. == 6);' ~/.ssh/known_hosts | |
# Note: Change the 6 according to the line number shown in the terminal error message |
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 PostObject = Parse.Object.extend("classnamegoeshere"); | |
var postobject = new PostObject(); | |
postobject.set("score", 1337); | |
postobject.set("playerName", $("#myFieldID").val()); | |
postobject.set("cheatMode", false); | |
postobject.save(null, { | |
success: function(postobject) { | |
// The object was saved successfully. |
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
([""'])(?:(?=(\\?))\2.)*?\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
$("#target").click(function() { | |
$("#result").load("ajax/test.html"); | |
}); |