Skip to content

Instantly share code, notes, and snippets.

View DanielleSucher's full-sized avatar

Danielle Sucher DanielleSucher

View GitHub Profile
````.................-------::::-`
`.-:/+ossyhhddmmmmmmmmmmmmmmdddddddddddddddddddddmmy:
`-/oydmmmmmdyso++/::-:::///////:::::::---.`````````````./hmh/
-/ydmdhyso+++//:------:---.`````` ````.:::-. `-ymh-
.+hmds/.:/:-------..````...------:::::::::::::--.```-//- :dm+
-ymds:` `-```````....------..````` `..------..`.://:.`-+/- .hms`
omd+` `----------.` ::......--://:::-/+/.`-/-` `yNy`
oNy` :/:.``````...--` -o` `.-+/:-//- .-. `yNy`
# username = "my_username"
# pwd = "my_password"
# target_path = "my_target_path"
# saving auth cookie
system %Q{wget --save-cookies /tmp/cookie.txt --keep-session-cookies --post-data "username=#{username}&password=#{pwd}" -O - \
https://rubytapas.dpdcart.com/subscriber/login?__dpd_cart=d08391e6-5fe2-4400-8b27-2dc17b413027}
(25..600).each do |i|
@DanielleSucher
DanielleSucher / one_char.sh
Last active December 17, 2015 22:59 — forked from aprescott/gist:5683945
Bash script to find all single-character commits in a git repository
first_commit=$(git log --pretty=format:%H | tail -1)
git rev-list --all --no-merges |
while read commit; do
if [ $commit == $first_commit ]; then break; fi;
IFS_backup=$IFS
IFS=$'\n'
diff_lines=( $(git diff --numstat --minimal -U0 --word-diff=porcelain $commit^ $commit | grep -E '^(\+[^+]|-[^-]).*$') )
IFS=$IFS_backup