[an error occurred while processing this directive].com

2Oct/093

Craigslist BS Filter

I'm moving and have been trudging through craigslist apartment listings daily. I CANNOT stand all the cliché buzzwords, misuse of symbols, and overall bs of realtors.

So, I cooked up a greasemonkey script that gets cuts through the bs and dramatically cleans up the apartment listings.

The post:

$1500/1BR XXXX-LARGE ***** SUPER MINT ***** MUST SEE. WILL NOT LAST 1BR Apt

Becomes:

1500/1Br Large 1Br Apt

ahhhhhhhhh, much better on my eyes.

The actions performed by the script are:

  • Replace a whole mess of cliche phrases and buzzwords
  • Get rid of all symbols
  • Remove repeating spaces
  • F I X   S P A C E D   O U T   W O R D S
  • Properly Case Every Word

If you missed the link to the script, you can grab it here. It requires firefox and the greasemonkey extension.

Filed under: code 3 Comments
4Apr/083

Google Error

Here's something you don't see every day. Google was giving me intermittent page errors

Errors usually give a little bit of insight into how sites are being ran. It looks like google is using squid for caching.

Filed under: code 3 Comments
22Mar/0827

Go to Home

The best ideas come from finding something you do all the time, realize you do it, and then automate it.

With me, I discovered that I frequently go to the base domain of a website by going to the URL, highlighting and deleting the junk on the end of the domain name and then pressing enter. I HATE doing it. I also have to do it when websites don't link to their home page.

So here's an easy solution. A bookmarklet!

Drag the link below to your bookmarks bar (or in IE, right-click and add to favorites):

Go to Home

Here is the code:

var url = new String(location.href);var re = new RegExp('https?://([A-Za-z0-9.-]+)');var res = url.match(re);location.href=res[0];

Enjoy :)

Filed under: code 27 Comments
5Oct/071

Useful script for downloading on linux

I always go through the same three steps to download a file (in tar.gz format)

  1. wget the tar.gz file I want
  2. untar it
  3. remove the original file I downloaded

So I made a bash script that does those three steps in one. Use it the same way as wget (# simple.sh http://path/to/file.tar.gz)


#!/bin/bash 

# change this to whatever extension you'd like to handle
ext=".tar.gz"

# flags to pass to tar
flg="-zxvf"

wget $1

file=`ls -t *$ext | grep -i -m 1 "^.*$ext$"`

if [[ -n $file ]]
then
    tar $flg $file
    unlink $file
else
    echo "Could not find the downloaded file."
fi


You can download it via this link (Remember to make it executable and to change its extension)

Filed under: code 1 Comment