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 t0 = performance.now(); | |
doSomething(); | |
var t1 = performance.now(); | |
console.log("Call to doSomething took " + (t1 - t0) + " milliseconds.") |
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
ssh-keygen -R hostname |
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
host ftp.example.com | |
IdentityFile ~/.ssh/key-for-example.pem | |
HostName example.com | |
User foo | |
# Source: http://fetchsoftworks.com/fetch/messageboard/sftp-with-public-key-how |
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
Make sure you're using the SSH one: | |
ssh://git@github.com/username/repo.git. | |
And NOT the https or git one. | |
Fix the url in the .git/config file. |
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
# to remove already deleted files: | |
git add -u . | |
git commit -m "manually deleting files" |
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
<?php | |
if ($_SERVER["HTTP_HOST"] == 'mydomain.com' || $_SERVER["HTTP_HOST"] == 'www.mydomain.com' ) { | |
// insert, for instance, analytics code here. | |
} |
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 . | |
This removes everything from the index, then just run: | |
git add . | |
Commit it: | |
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
git branch -D <branchName> | |
git push origin :<branchName> |
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
<?php | |
// Define custom query parameters | |
$custom_query_args = array( | |
'post_type' => 'news', | |
'orderby' => 'asc', | |
'paged' => $paged, | |
'posts_per_page' => 2 | |
); |
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 config --global alias.<NAME> "<COMMAND>" |