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
[alias] | |
lg = log --graph --all --format=format:'%C(bold red)%h%C(reset) - %C(bold green)%ad%C(reset) %C(white)%s%C(reset) %C(bold white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=short | |
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short |
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
for f in *.batch; | |
do | |
m=`shasum ${f} | awk '{print substr($1,0,6)}'` | |
echo "${f} -> ${m}_${f}" | |
mv $f ${m}_${f} | |
done; |
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
# change mask for different filetypes | |
for f in *.batch; | |
do | |
m=`shasum ${f} | awk '{print substr($1,0,6)}'` | |
echo "${f} -> ${m}_${f}" | |
mv $f ${m}_${f} | |
done; |
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
validateEmail = function(email) { | |
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/; | |
return re.test(email); | |
} | |
emailPeriodPossibilities = function(str) { | |
if(!validateEmail(str)) { return false } | |
var name = str.match(/^([^@]*)@/)[1]; | |
var domain = str.match(/^([^@]*)@(.*)/)[2]; | |
matches = []; | |
for(var i=1;i<name.length;i++) { |
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
¯\_(ツ)_/¯ |
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 djb2(str){ | |
var hash = 5381; | |
for (var i = 0; i < str.length; i++) { | |
hash = ((hash << 5) + hash) + str.charCodeAt(i); /* hash * 33 + c */ | |
} | |
return hash; | |
} | |
function hashStringToColor(str) { | |
var hash = djb2(str); |
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
Wordlist ver 0.732 - EXPECT INCOMPATIBLE CHANGES; | |
acrobat africa alaska albert albino album | |
alcohol alex alpha amadeus amanda amazon | |
america analog animal antenna antonio apollo | |
april aroma artist aspirin athlete atlas | |
banana bandit banjo bikini bingo bonus | |
camera canada carbon casino catalog cinema | |
citizen cobra comet compact complex context | |
credit critic crystal culture david delta | |
dialog diploma doctor domino dragon drama |
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
if [[ $1 ]] | |
then | |
# make sure we have required argment | |
echo "Attempting to copy files to $1" | |
else | |
echo "No target destination specified" | |
exit | |
fi | |
echo "Building md5 log" | |
# Unix timestamp filename |
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
# Make a directory to hold any duplicates we find; this may result in "directory already exists" if running a second time. | |
mkdir duplicates | |
# Create an empty log file to hold hashes so we know which files we have seen before | |
log=/tmp/md5copylog-`date +%s`.log | |
touch $log | |
# For any file (can change this to *.MOV to do just .MOV files, for example) | |
for f in *.*; | |
do |
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
_.mixin({ | |
median : function(data) { | |
if(data.length < 1) return 0; | |
var slot = (data.length+1) / 2; | |
if (slot % 1 === 0) { | |
return data[slot-1]; | |
} else { | |
var lower = Math.floor(slot); | |
var upper = Math.ceil(slot); | |
return (data[lower-1] + data[lower-1]) / 2; |
OlderNewer