Skip to content

Instantly share code, notes, and snippets.

View digininja's full-sized avatar
💭
Hacking away

Robin Wood digininja

💭
Hacking away
View GitHub Profile
@random-robbie
random-robbie / go-executable-build
Last active July 3, 2020 01:20
go-executable-build
#!/usr/bin/env bash
# package list can be found https://www.digitalocean.com/community/tutorials/how-to-build-go-executables-for-multiple-platforms-on-ubuntu-16-04
package=$1
if [[ -z "$package" ]]; then
echo "usage: $0 <package-name>"
exit 1
fi
package_split=(${package//\// })
package_name=${package_split[-1]}
@rogersguedes
rogersguedes / unvar_dump.php
Created October 10, 2017 23:53
PHP reverse var_dump function
<?php
/*
* thanks to
* - https://stackoverflow.com/questions/3531857/convert-var-dump-of-array-back-to-array-variable
* - https://stackoverflow.com/questions/2853454/php-unserialize-fails-with-non-encoded-characters
*/
function unvar_dump($str) {
if (strpos($str, "\n") === false) {
//Add new lines:
$regex = array(
@bnagy
bnagy / gpgmutt.md
Last active July 21, 2025 11:06
Mutt, Gmail and GPG

GPG / Mutt / Gmail

About

This is a collection of snippets, not a comprehensive guide. I suggest you start with Operational PGP.

Here is an incomplete list of things that are different from other approaches:

  • I don't use keyservers. Ever.
  • Yes, I use Gmail instead of some bespoke hipster freedom service
@willurd
willurd / web-servers.md
Last active August 27, 2025 14:48
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000