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
require 'benchmark' | |
big_number = 1_000_000 | |
a = 1.upto big_number | |
b = big_number.upto big_number * 2 | |
a_array = a.to_a | |
b_array = b.to_a | |
class MultipleEnumerator | |
include Enumerable |
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
#!/bin/bash | |
REMOTE=$1 | |
if [[ -z "$REMOTE" ]] ; then | |
REMOTE='origin' | |
fi | |
PARSED=$(git remote -v | grep '(fetch)' | grep "^$REMOTE\t" | awk -F "\t| " '{print $2}' | sed -E -e 's/\.git$//' -e 's/^.+@//') | |
if [[ -z "$PARSED" ]] ; then | |
echo "Cannot find git remote: $REMOTE" |
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
[alias] | |
# basic shortcut | |
br = branch | |
ci = commit | |
co = checkout | |
df = diff | |
rb = rebase | |
stat = status | |
# full info |
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
#!/bin/bash | |
# https://httpd.apache.org/docs/2.2/misc/password_encryptions.html | |
HTPASSWD=$1 | |
USERNAME=$2 | |
PASSWORD=$3 | |
ENTRY=`cat $HTPASSWD | grep "^$USERNAME:"` | |
HASH=`echo $ENTRY | cut -f 2 -d :` | |
SALT=`echo $HASH | cut -f 3 -d $` |
NewerOlder