Lincoln Stoll about me contact code
Nov 12
Comments (View)  Permalink



Comments (View)  Permalink



Nov 08

Getting rid of the Spotlight Menu Icon in 10.6

It seems that Snow Leopard has gone back to the 10.4 way of displaying the spotlight menu item, which fortunately makes it easy to disable. This saves precious real estate, and gets rid of something that is pointless - I use launchbar for this. To disable run:

 sudo chmod 600 /System/Library/CoreServices/Search.bundle/Contents/MacOS/Search
killall SystemUIServer
This makes the item only readable by root, ensuring that it will get updated by software update and the link, but won’t be runnable by you. To rever this, change the permissions back to 644.

Comments (View)  Permalink



Nov 07
Comments (View)  Permalink



Nov 05

XPather paths not working

If you’ve ever had to page scrape any crappy sites (i.e you can’t use CSS selectors because there isn’t any) you’ve probably ended up using XPath, and the easiest way to find those XPath expressions is to use the XPather extension for firefox. And once you’ve got to an expression that involves tables, you’ve probably ended up wondering why it didn’t work. I certainly have, repeatedly, and end up finding the solution again and having a duh, I know this moment. In order to avoid this, here’s the explanation: Firefox inserts TBody tags into the rendered HTML even if they don’t exist in the source, and this is the HTML XPather is working against So the solution? Remove the tbody tags, and you should be right to go.

Comments (View)  Permalink



Vim + Transmit Remote Editing

I was having problems getting MacVim to work with Transmit’s remote editing feature - when I saved the file, it wasn’t uploaded. Turns out by default Vim can create it’s backup files by renaming the original as well as creating a copy - when it decides to rename, Transmit is left looking at the old file so never detects the updates. The solution is simple: add

 set backupcopy=yes 
to your ~/.vimrc . This will force vim to always create backups by copying, ensuring the original file gets updated.

Comments (View)  Permalink



Bulk deleting tumblr posts

Because tumblr doesn’t let you change the default blog, I wanted to clear out the old original blog I had to re-use for this site. Which brought me to the other problem - tumblr provide no way to batch delete posts, and will over 1,000 items in there I wasn’t going to sit around and delete each one by hand. So here’s a quick script I wrote, I hope it’s useful to someone.

require 'rubygems'
require 'open-uri'
require 'mechanize'
require 'pp'

site_dashboard_url = 'http://www.tumblr.com/tumblelog/lstoll'
email = 'lstoll@lstoll.net'
password = 'xxxxxx'

agent = WWW::Mechanize.new
agent.follow_meta_refresh = true
login = agent.get('http://www.tumblr.com/login')
page = login.form_with(:action => '/login') do |f|
  f.email = email
  f.password = password
end.click_button

page = agent.get(site_dashboard_url)

while form = page.form_with(:action => '/delete')
  puts "about to submit..."
  page = form.submit
end

Comments (View)  Permalink



Oct 25

Installing hgsubversion with Macports Python

Being reasonably new to python I had a few issues particulary with this error:

 *** failed to import extension hgsubversion from /Users/lstoll/sw/ hgext/hgsubversion/hgsubversion: No module named svn 
Which didn’t help me that much. So here’s how I installed it with Macports in case the same happens to you
sudo port install subversion-python26bindings 
mkdir -p ~/sw/hgext && cd ~/sw/hgext 
hg clone https://bitbucket.org/durin42/hgsubversion/
Then add “hgsubversion=/Users//sw/hgext/hgsubversion/hgsubversion” to your ~/.hgrc

Comments (View)  Permalink



64-bit Darwin Streaming Server package for Ubuntu

You can find it here: http://cloud.github.com/downloads/lstoll/dss/DarwinStreamingSrvr6.0.3-L2-Linux-x64.deb.gz. It’s had minimal testing, so please test it well before using it anywhere important. If you find any issues please report them at http://github.com/lstoll/dss/issues

Comments (View)  Permalink



Oct 24
Comments (View)  Permalink