Skip to content

Instantly share code, notes, and snippets.

View serious-angel's full-sized avatar
...cogito, ergo sum...

Artfaith serious-angel

...cogito, ergo sum...
View GitHub Profile
@bsaf
bsaf / guybrush.txt
Created May 11, 2012 13:15
Guybrush's lines from The Secret of Monkey Island
# 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.'
@stevegrunwell
stevegrunwell / get_current_git_commit.php
Created August 15, 2012 21:44
Get current git HEAD using PHP
<?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 {
@pascalpoitras
pascalpoitras / config.md
Last active October 7, 2024 01:35
My WeeChat configuration

WeeChat Screenshot

Mouse


enable


@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@abtrout
abtrout / pass.md
Created July 8, 2014 14:51
Using password-store with git repository synching

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.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@sylvaincombes
sylvaincombes / my-external-ip.sh
Last active July 7, 2024 10:38
View your external ip from linux / unix shell
# 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
@ygotthilf
ygotthilf / jwtRS256.sh
Last active November 7, 2024 10:42
How to generate JWT RS256 key
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
/* 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 */
}
@zfael
zfael / nodejs.checksum.js
Created June 20, 2017 13:57
NODE.JS - How to generate file's Checksum (CRYPTO)
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
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active November 21, 2024 13:45
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux