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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-rc1/jquery.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pako/1.0.1/pako.min.js"></script> | |
</head> | |
<body> | |
<form id="my-form"> | |
<input type="file" name="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
sudo mkdir -m 0700 /var/www/.ssh | |
sudo chown -R www-data:www-data /var/www/.ssh | |
sudo -u www-data ssh-keygen (empty passphrase) | |
# On Github, paste public key into "Deploy keys" | |
sudo -u www-data bash | |
cd /path/to/repo | |
git clone ... |
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
// Ported from Stefan Gustavson's java implementation | |
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf | |
// Read Stefan's excellent paper for details on how this code works. | |
// | |
// Sean McCullough banksean@gmail.com | |
/** | |
* You can pass in a random number generator object if you like. | |
* It is assumed to have a random() method. | |
*/ |
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
#!/usr/bin/env bash | |
# Script for automatic setup of SOCKS proxy through SSH connection. | |
# It automatically teardowns SOCKS configuration before stopping. | |
# It's supposed to work on Mac OS X 10.6+ | |
# | |
# Author: Adam Stankiewicz (@sheerun) | |
# | |
[[ -n "$1" ]] || { echo "Usage: proxy user@example.com"; exit 1; } |
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
function cd_dir_history() | |
{ | |
OLDPWD="$PWD" | |
echo "# $(date) $USER -> $@" >> "$HISTFILE" | |
command cd "$@" | |
# If this directory is writable then write to directory-based history file | |
# otherwise write history in the usual home-based history file. | |
touch "$PWD/.dir_bash_history" 2>/dev/null \ |