The Python code above goes into your IMAP-over-SSL inbox, gets Lyft receipts, parses them and puts out a report that can then be imported into Excel, R, or any other program that can read comma-separated values. I use this to classify my lyft usage as business or personal -- I can claim the business expense as part of my tax refund.
November 11, 2016
October 18, 2016
I was travelling earlier today and had a third of the day as downtime. But instead of the usual, twiddling of thumbs, chatting my neighbour up, etc. I focused inward. I've been wanting to upgrade my USB key to a newer version, and in doing so, automate the process. So I got started, I found the NetBSD sources I needed (I know I wanted to use OpenBSD, but that's for a future piece). The advantage of NetBSD is that its build system supports cross-compilation -- important for build speed -- and the base system takes less than 1 gig -- important for a flash drive. I set up a speedy ec2 instance for the build, using the Ubuntu trusty image and put the below script into /etc/rc.local, which checks out the latest NetBSD 7-STABLE source code, builds the amd64 port's live image, which needs to be put onto a USB key. Future enhancements are going to be to autoinstall the packages that we want on the system, but for now... if you should want a key of your own and aren't comfortable with this sort of hackery, you can send me $25 to cover the acquisition cost and shipping. E-mail your address and the packages you want installed to me and, a few weeks later, the stork will deliver you a live, USB-based NetBSD installation. Stick it in your machine, tell the BIOS to boot from it and you'll be set for life. I'll add the script to automatically set up the ec2 instance for true one click builds, if I get enough inquiries.
Finally, if you should have any suggestions, feel free to leave them in the comments.
October 1, 2016
The above python script lets you see a report of a comment's permalink and its score if the score is below 1. A demo from a random reddit account follows:
% python ./bin/redditScores.py -u meh613 https://www.reddit.com/r/asktrp/comments/53w05p/signs_a_woman_is_cheating/: 0 https://www.reddit.com/r/asktrp/comments/530p3r/how_do_i_play_this/: 0 https://www.reddit.com/r/dating_advice/comments/52ksoa/ladies_on_a_dating_site_how_do_you_tell_the/: -1 https://www.reddit.com/r/socialskills/comments/51fsak/my_social_life_is_great_but_my_love_life_is/: -3
September 1, 2016
I just wrote myself a simple Java alarm clock. Takes a parameter denoting the number of hours and displays an error alert (below) when the time has been reached. This is to prevent my spending too much time going down rabbit holes. I'm releasing this in the public domain such that someone might find it useful.
July 14, 2016
Karma refers to scoring comments on Reddit and the service does not sort the scores by date, just the comments themselves. The script above runs through and grabs all of your comments, keeps their scores and shows those comments whose scores have changed in the past 24 hours (86400 seconds). I do hope you find this useful and I look forward to your suggestions as to how to enhance it further.
June 28, 2016
% python3.5 receipts.py -p [password] $ 151.73Next step is to support that other large payment processor on the Internet, along with any other suggestions users have.
June 22, 2016
While I am a big consumer of podcasts, I am most decidedly not an iTunes user. However, a few podcasts don't list their feed urls on their homepages. It turns out there is a sneaky way to find out what the feed url is. I say sneaky only because Apple does not link to the feed on their site. And the output is in fairly standard JSON.
May 21, 2016
Unfortunately, I use an ISP that doesn't let me host services at home. So, I've taken to using hidden services to host said services, which leads to the problem of keeping track of the hostnames. Solution, provide the hostnames in JSON on the web uploaded from home on boot. So, if you want to find the onion hosts, look here. Remember to add ".to" if you aren't using the TorBrowser.