This file contains hidden or 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 | |
echo "Enter your password:\n"; | |
$handle = fopen ("php://stdin","r"); | |
$line = fgets($handle); | |
echo "HashedPassword:\n" . hash("sha512", trim($line)) . "\n"; | |
?> |
This file contains hidden or 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 for.loop { | |
if [ $# -eq 0 ] | |
then | |
echo "Usage: for.loop <num-of-iterations> <command>" | |
return | |
fi | |
local iterations=${1} | |
local cmd=${@:2} | |
for i in $(seq 1 ${iterations}); do ${cmd}; done | |
} |
This file contains hidden or 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
"toggle highlighting search results with space bar" | |
set hlsearch | |
noremap <silent> <Space> :silent noh<Bar>echo<CR> |
This file contains hidden or 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 millis { | |
nvm use v0.10.12 > /dev/null && node -e "var m = require('moment'); console.log(+m.utc('${1}', ['MM/DD/YY', 'YYYYMMDDTHH:mm:ss']))" | |
} | |
function fmillis { | |
nvm use v0.10.12 > /dev/null && node -e "var m = require('moment'); console.log(m(${1}).utc().format())" | |
} |