Skip to content

Instantly share code, notes, and snippets.

@trauber
trauber / dumbphone.md
Created October 29, 2013 17:39
A Smarter Dumbphone

I can't find any documentation supporting piping stdout to mutt, but it works for me. Provide the -nc to gcal for plain text output. Use --cal to specify a calendar to use. The agenda argument tells gcalcli to list the next three days' events.

gcalcli --nc --cal home agenda| mutt -s "subject here" -c phonenumber1@smsgateway phonenumber2@smsgateway

I run this in my crontab and everbody in the family gets a text message listing upcoming events.

@trauber
trauber / sd.css
Last active December 30, 2015 22:29
sd.css - simple documenation css
img { max-width: 100%; max-height: 100%; }
pre { overflow-x: auto; }
@trauber
trauber / readme.md
Created July 4, 2019 18:11
Sending HTML Mail with Mutt
mutt -e 'set content_type=text/html' -s 'subject' recip@host.com < file.html
@trauber
trauber / store-encrypted-gmail-pass-for-mutt.md
Last active July 10, 2019 12:56
Store Encrypted Gmail Pass in Mutt #e-mail #encryption #password

Create in ~/.mutt/pass with contents:

set my_pass = "password"

Encrypt the file:

@trauber
trauber / blocknotesplitter.md
Last active July 10, 2019 12:57
#awk #markdown #firefox_addon
@trauber
trauber / README.md
Created July 17, 2019 12:40
#gs #pdf QandD Shrink a PDF with GS

QandDShrink a PDF with GS

I imagine mileage may vary on this but I was able to shrink a 15mb PDF to 2.5mb.


$ pdf2ps large.pdf large.ps

$ ps2pdf large.ps small.pdf
@trauber
trauber / README.md
Last active July 17, 2019 12:51
#vcard #ex Remove Photos from Vcard with Ex

Remove Photos from Vcards

Good ole ex matches multiple lines very easily.

ex -n test.vcf +'g/PHOTO/,/^$/d' +wq
@trauber
trauber / jsonphotos.sh
Created July 25, 2019 19:47
Make a JSON List of Photos #json
# Use find and file to crawl for files with mime-type image/jpeg or image/png.
# Awk isolates file names.
# rjgpcom gets comments, if any.
# jo wraps everything up into json for jsongallery.
#
# https://jpmens.net/2016/03/05/a-shell-command-to-create-json-jo
# https://github.com/mariobox/jsongallery

Processing Timetrap Output for Invoicing

Process and Awk Draft

t display --format csv > tmp.csv

Latest Awk for My Timetrap/Pandoc/LaTeX Invoicing System

Output is YAML for use as Pandoc metadata. The YAML contains LaTeX strings. \quad and \hphantom come in handy for spacing LaTeX item lists in the invoice template I'm using.

# Process tsv generated from timetrap.rb display output