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 -l -f id_rsa.pub | |
2048 aa:bb:cc:dd:ee:ff:00:11:22:33:44:55:66:77:88:99 id_rsa.pub (RSA) |
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
<script> | |
var ua = navigator.userAgent; | |
var checker = { | |
ios: ua.match(/(iPhone|iPod|iPad)/), | |
blackberry: ua.match(/BlackBerry/), | |
android: ua.match(/Android/), | |
windowsphone: ua.match(/Windows Phone/) | |
}; | |
$(document).ready(function() { |
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 shortlog -s -n |
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
/* | |
* Updated to use the function-based method described in http://www.phpied.com/social-button-bffs/ | |
* Better handling of scripts without supplied ids. | |
* | |
* N.B. Be sure to include Google Analytics's _gaq and Facebook's fbAsyncInit prior to this function. | |
*/ | |
(function(doc, script) { | |
var js, | |
fjs = doc.getElementsByTagName(script)[0], |
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
// thanks to daniel walsh | |
// http://davidwalsh.name/array-sort | |
// http://dochub.io/#javascript and search for sort to see more details | |
// sort by age | |
var o = [{name : "Robin Van Persie", age: 28}, | |
{name : "Theo Walcott", age : 22}, | |
{name : "Bacary Sagna", age : 26} | |
].sort(function(obj1, obj2) { | |
return obj1.name - obj2.name; |
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
# rm /var/lib/dpkg/info/flashplugin-nonfree.prerm | |
# dpkg --remove --force-remove-reinstreq <package> |
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
# aptitude search ~c |
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
# aptitude purge ~c |
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
#!/bin/sh | |
# Place as .git/hooks/pre-commit | |
#Reject any commit that would have PHP syntaz errors on .php , .module, .install, .inc files | |
#### | |
# Reject any commit that would add a line with tabs. | |
# | |
# You can enable this as a repo policy with | |
# | |
# git config hooks.allowtabs true | |
#### |
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
#!/bin/sh | |
# | |
# A git hook script to find and fix trailing whitespace | |
# in your commits. Bypass it with the --no-verify option | |
# to git-commit | |
# | |
# Find files with trailing whitespace | |
for file in `git diff --check --cached | grep '^[^+-]' | grep -o '^.*[0-9]\+:'` ; do |
OlderNewer