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
# extracted from http://www.gamefaqs.com/pc/562681-the-secret-of-monkey-island/faqs/23891 | |
Hi! My name's Guybrush Threepwood, and I want to be a pirate! | |
Er... I'm over this way. | |
THREEPWOOD. Guybrush THREEPWOOD. | |
Gosh, thanks! I'll do that! Bye, now. I'm off to seek my fortune. | |
(walks away, but suddenly stops) | |
Right. Thanks. | |
My name's Guybrush Threepwood. I'm new in town. | |
I don't know... I kind of like 'Guybrush.' |
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 | |
/** | |
* Get the hash of the current git HEAD | |
* @param str $branch The git branch to check | |
* @return mixed Either the hash or a boolean false | |
*/ | |
function get_current_git_commit( $branch='master' ) { | |
if ( $hash = file_get_contents( sprintf( '.git/refs/heads/%s', $branch ) ) ) { | |
return $hash; | |
} else { |
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
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash |
Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store
. For more information about GPG, consult the GNU Privacy Handbook.
To get started, install pass
and generate a keypair.
$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
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
# with dig (fastest way) | |
dig +short myip.opendns.com @resolver1.opendns.com; | |
# alternative | |
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com | awk -F'"' '{ print $2}'; | |
###################################################################################################### | |
## Other method with curl / get and 3rd party, this choice is less judicious | |
###################################################################################################### | |
# with curl |
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 -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
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
/* Scrollbar */ | |
/* From Quassel Wiki: http://sprunge.us/iZGB */ | |
QScrollBar { | |
background: #131313; | |
margin: 0; | |
} | |
QScrollBar:hover { | |
/* Optional: Subtle accent of scrolling area on hover */ | |
background: #161616; /* base +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
var fs = require('fs'); | |
var crypto = require('crypto'); | |
fs.readFile('file.pdf', function(err, data) { | |
var checksum = generateChecksum(data); | |
console.log(checksum); | |
}); | |
function generateChecksum(str, algorithm, encoding) { | |
return crypto |
OlderNewer