Skip to content

Instantly share code, notes, and snippets.

View msmarcal's full-sized avatar
🏠
Working from home

Marcelo Subtil Marcal msmarcal

🏠
Working from home
View GitHub Profile
@msmarcal
msmarcal / .lftp.mockup.rc
Created October 3, 2016 16:17 — forked from gaubert/.lftp.mockup.rc
~/.lftp.rc parameters detailed
########## SETTINGS
# On startup, lftp executes ~/.lftprc and ~/.lftp/rc. You can place aliases and 'set' commands
# there. Some people prefer to see full protocol debug, use 'debug' to turn the debug on.
# Certain commands and settings take a time interval parameter. It has the format Nx[Nx...], where N is time amount
# (floating point) and x is time unit: d - days, h - hours, m - minutes, s - seconds. Default unit is second. E.g.
# 5h30m or 5.5h. Also the interval can be 'infinity', 'inf', 'never', 'forever' - it means infinite interval. E.g.
# 'sleep forever' or 'set dns:cache-expire never'.
@msmarcal
msmarcal / Get IPv6
Last active October 27, 2016 16:12
ifconfig | grep "inet6 "| cut -d ' ' -f 2 > /Users/msmarcal/Dropbox/000-IPTRACK/DEXTER/PONG
curl 'http://v6.ident.me/' >> /Users/msmarcal/Dropbox/000-IPTRACK/DEXTER/PONG
dig AAAA myip.opendns.com +short @2620:0:ccc::2 >> /Users/msmarcal/Dropbox/000-IPTRACK/DEXTER/PONG
rm $1
PASSWD=<YOUR PASSWORD>
NEW_FILENAME="$(echo $1 | sed -E 's/Fatura_([0-9]{2})([0-9]{4}).*/\2-\1-VISA.pdf/')"
qpdf --decrypt --password=$PASSWD "$1" "$NEW_FILENAME"
/opt/local/bin/tag -a "topay" "$NEW_FILENAME"
rm -rf "$1"