Archiving Sent Mail with imapfilter

My “sent” folders are a morass. I think that’s true of most folks. I wrote a little script in my imapfilter config.lua to duplicate some handy functionality from the venerable pine. I’m sure it could be cleaned up a bit, but it does the job for me. On the first of the month, it creates a folder called “Sent-Monthname-Year”, and moves everything from sent that’s older than a day to it.


function moveSentMessages()
  --------------------------------
  -- On the first of the month  --
  -- move all older messages to --
  -- a date marked sent folder  --
  --------------------------------

  theDate = os.date("*t")

  months = {
    "January",
    "February",
    "March",
    "April",
    "May",
    "June",
    "July",
    "August",
    "September",
    "October",
    "November",
    "December"
  }

  if (theDate["day"] == 1) then
    dateString = "Sent-" .. months[theDate["month"] - 1] .. "-" .. theDate["year"]
    
    messages = personal["Sent"]:is_older(1) + personal["Sent Messages"]:is_older(1)
    messages:move_messages(personal[dateString])
  end
end

Editing the hosts file on Windows

I have to Google this once a week. It doesn’t stick. At least this way, maybe I’ll find my own site when I Google. The easiest thing to do is create a shortcut on the desktop. It should point to

notepad.exe C:\Windows\System32\drivers\etc\hosts

Then run this shortcut as an administrator whenever you need to add a new host.

Quickly adding a link to the iOS Simulator

I was looking for a way to easily add a link to the iOS Simulator in my ~/Applications folder, but every explanation that worked for Mavericks seemed unnecessarily complicated to me. Here’s what I figured out myself:

  1. Open Xcode and launch the simulator as normal
  2. Control-click on the simulator icon in the dock, and select Options → Show in Finder
  3. Open a terminal, and type ln -s
  4. Drag the simulator icon to the terminal window
  5. Drag the destination for the link to the terminal window, and hit Enter

Link Dump

CSS Colours and Colors: A nicer color palette for the web

CSS Colours presents all the standard CSS colours in nice large swatches. Mouse over the swatch for hex and RGB values.

Colors provides much nicer versions of a subset of the default CSS colours. They’re a bit less saturated, the black isn’t pure; generally it’s more like something you’d actually use in a design. You can grab the values from the page itself, or grab the stylesheets and source files for a variety of CSS preprocessors from github.

9 Quick Wins for Halfway-Decent Design

David Kadavy writes up tips to point the less the aesthetically skilled on the road to an attractive app or web page. If you want more from David, he has a book and an email course called “Design for Hackers”.

Grid

Grid covers the absolute minimum you need to know to get started with creating responsive web pages. If you stopped here, you’d still be creating layouts that work great on a variety of devices.