JUN 14
So I have to admit that after watching some Kitchen 4B, I developed a bit of a crush on Jill Santopietro. Unfortunately, The Moment only has a single RSS feed for the entire blog, and this includes a bunch of content I’m not particularly interested in. But with some quick Hpricot magic, I quickly whipped up a script to use in NetNewsWire. (Also, much love for NetNewsWire enabling me to create subscriptions to scripts such as these.)
#!/usr/bin/env ruby require 'rubygems' # Since I"m too lazy to set the RUBYOPTS # environment variable for NetNewsWire require 'hpricot' require 'open-uri' doc = Hpricot.XML(open('http://themoment.blogs.nytimes.com/feed/atom/')) (doc/:entry).reject {|entry| (entry/:author/:name).inner_text =~ /Jill Santopietro/ }.remove puts doc.to_html
JUN 08
Much thanks to these blog posts for revealing the secrets behind rotating video with mencoder. Specifically, I had taken video on my D90 which needed to be rotated into portrait.
mencoder -vf rotate=3,scale=405:720 -o middle.avi -oac copy -fafmttag 1 -ovc lavc -lavcopts vcodec=mjpeg input.avi mencoder -vf expand=960:720 -oac copy -ovc lavc -lavcopts vcodec=mjpeg middle.avi -o output.avi
This is how I currently (as of 2009.05.20) like to cook my steaks. This may change in the future as I learn more, but for now, it strikes the right balance between taste and convenience.
My preferred cut is a ribeye. I haven’t actually tried all the other cuts out myself, but the ribeye is supposed to be fattier, which certainly agrees with what I’ve experienced so far.
The actual preparation and cooking is straightforward:
- Bring the steak up to room temperature.
- Start the grill, with the temperature turned almost to the maximum.
- Rub oil, salt, and pepper into each side of the steak.
- Place the steak on the grill.
- Wait four minutes.
- Flip the ribeye.
- Wait another four minutes.
- Take the steak off the heat onto a plate.
- Cover and let it sit for a few minutes.
- Eat.
So that’s the way I like to grill my steaks. Simple and tasty, nothing complicated.
MAY 19
I did this to use XMarks on my own server. In lighttpd.conf:
$HTTP["host"] =~ "xmarks.foobar.com" { server.document-root = "/path/to/xmarks/dir" webdav.activate = "enable" webdav.is-readonly = "disable" webdav.sqlite-db-name = "/var/run/lighttpd/lighttpd.webdav_lock.db" auth.backend = "htdigest" auth.backend.htdigest.userfile = "/path/to/xmarks/dir/.passwd" auth.require = ( "" => ( "method" => "digest", "realm" => "webdav", "require" => "valid-user" ) )
Then on the command line:
$ sudo apt-get install apache2-utils $ cd /path/to/xmarks/dir $ htdigest -c .passwd webdav USERNAME
APR 30
Because I’m a) lazy and b) a huge nerd, I added support for drafts to this blog, which runs on Webby. It’s fairly straightforward, requiring two new tasks in blog.rake and of course, the draft.erb template. As always, the latest code can be found at my blog’s github repo.
In blog.rake:
desc 'Create a new draft' task 'draft' do |t| page, title, dir = Webby::Builder.new_page_info title = Webby.site.args.raw[0] # undo the titlecasing raise "Don't specify a directory for a blog post!" unless dir.empty? page = File.join(Webby.site.draft_dir, File.basename(page)) page = Webby::Builder.create(page, :from => File.join(Webby.site.template_dir, 'blog', 'draft.erb'), :locals => { :title => title, :directory => Webby.site.draft_dir }) Webby.exec_editor(page) end desc 'Publish a draft' task 'publish_draft' do |t| site = Webby.site draft = site.args.raw[0] drafts = Dir["#{site.content_dir}/#{site.draft_dir}/*#{draft}*.txt"] raise "No drafts matching '#{draft}'" if drafts.empty? raise "Found multiple drafts matching '#{draft}': #{drafts.map {|d| File.basename(d) }.join(', ')}" if drafts.size > 1 # drafts.size == 1 draft = drafts[0] draft = Webby::Resources::Page.new(draft) now = Time.now year = now.strftime('%Y') month = now.strftime('%m') day = now.strftime('%d') dir = File.join(Webby.site.blog_dir, year, month, day) page = File.join(dir, draft.name) page = Webby::Builder.create(page, :from => File.join(Webby.site.template_dir, 'blog', 'post.erb'), :locals => { :title => draft._meta_data['title'], :directory => dir, :created_at => now.to_y, :body => draft._read }) Logging::Logger['Webby'].info "deleting #{draft.path}" FileUtils.rm(draft.path) end
This does require the modifications to the create_year_index and create_month_index tasks I made, but should be relatively straightforward to port back into the blog.rake file included with Webby’s blog template.
To use this, I create draft posts using webby blog:draft "Some draft title" and when I’m ready to actually post the article, webby blog:publish_draft title. (The argument for publish_draft is used in a regex to locate the draft to publish.)