February 6, 2010 at 2:02:28 AM PST
Taking the Dumb Pipe to China
Note: This story finally ended
So, yesterday I tweeted:
Dialed an 866 WebEx number on my iPhone, getting charged by AT&T for calling China. idontevenknowwhotoblamefail
#!/usr/bin/env ruby | |
require 'json' | |
require 'date' | |
require 'net/http' | |
require 'rb-scpt' | |
include Appscript | |
# Set up things | |
list = "To read, etc." |
February 6, 2010 at 2:02:28 AM PST
Taking the Dumb Pipe to China
Note: This story finally ended
So, yesterday I tweeted:
Dialed an 866 WebEx number on my iPhone, getting charged by AT&T for calling China. idontevenknowwhotoblamefail
tell application "iTunes" | |
set myList to the user playlist "Ride" | |
set myTracks to the file tracks of myList | |
repeat with theTrack in myTracks | |
tell theTrack | |
set the volume adjustment to "75" | |
end tell | |
end repeat | |
end tell |
#!/usr/bin/env ruby | |
require 'sentimental' | |
# takes two arguments (starting letter and sentiment, where sentiment should be 'positive,' 'negative,' 'neutral.') | |
letter = ARGV[0] | |
sentiment = ARGV[1] || "negative" | |
analyzer = Sentimental.new(threshold: 0.3) | |
analyzer.load_defaults |
I spent a lot of time messing around with mutt this week. At first I was just trying to get a working config back in place, so there was some noodling with OfflineIMAP. Then I moved on to cleaning up my authentication stuff: Due to an inconsistency in names on my work and personal computers, I needed to get some hard-coded values out of a few scripts.
Today, I spent a lot of time working on scoring, which is where I think mutt diverges from most other mail clients in the way that's most meaningful to me.
mutt's scoring tools let you assign scores to mail based on just about any characteristic of an email. You can match patterns on subject, sender, recipient, age, read/unread status, attachments, etc. etc. and then use those patterns to increment scores on individual messages.
Here are a few examples:
# Bump people in my aliases
#!/usr/bin/ruby | |
account = ARGV[0] # account name, e.g. [email protected] | |
server = ARGV[1] # account server, e.g. imap.gmail.com | |
user = `whoami`.strip! | |
keychain_path = "#{ENV['HOME']}/Library/Keychains/login.keychain" | |
params = {'security' => '/usr/bin/security', | |
'command' => 'find-internet-password', | |
'account' => account, |
#!/usr/bin/env ruby | |
require 'mail' | |
# read STDIN in binmode to flatten out messages with encoding issues, weird attachments or whatever | |
mail = Mail.new STDIN.binmode.read | |
# should be a value like "+20" or "-10" | |
args = ARGV[0] | |
# assume you keep your scores file in the same directory as this script and call it `scores` |
[The Homely Mutt][mutt] is still a pretty good resource for getting back up and running on mutt. I've had a versioned muttrc sitting around for a long while. Judging from the stuff I found in there when I dusted it all off over the weekend, and then looking into my scores file to see what I was nudging up or down in visibility over the years, I got serious about mutt and developed a pretty complex configuration sometime well before Ben was born.
I know exactly why I quit using it, too: it was a good thing when mutt made it possible to talk to IMAP and SMTP directly and introduced caching, but it also meant that search became a problem: The search tools needed a Maildir or mbox archive sitting on the disk, and all mutt provided was its own cache. I struggled on for a little while happy that I was liberated of the need to use fetchmail to get stuff down to the disk, but hating that I needed to go to the Gmail web interface to search for older messages.
The thing that made me wake mutt back up this time was
#!/usr/bin/env ruby | |
require 'json' | |
require 'date' | |
require 'erb' | |
resume_json = File.read("resume.json") | |
@resume = JSON.parse(resume_json) | |
md_template_file = File.read('erb/resume.md.erb') | |
latex_template_file = File.read('erb/experience.tex.erb') | |
@jobs = @resume["work"] |
Hi. Happy Friday evening. I am three chapters in to [Invisible Women: Data Bias in a World Designed for Men][iw] by [@CCriadoPerez][].
Here are a few more words, but but don't read them until you at least bookmark that link, download a sample, or just go ahead and buy your copy: I'll refund the price if you don't like it, and give your copy to a friend.
I placed an advance order when I read a review, it arrived a few nights ago, and in two nights I have gone from "I want to read this,"