Monthly Archives: December 2009

Extracting When You Visited A Page From Firefox

December 18, 2009 » Geek

Need to get the exact time that you visited a page in Firefox? I couldn’t find an easy way to look this up in the History interface, or anywhere else for that matter. I did however know that Firefox stores this kind of thing in sqlite3 databases. Here’s how I got what I needed.

First you have to find the sqlite databases, I’m on Linux so that would be in my home directory. The database you want is places.sqlite. Crack that open in sqlite3. Your command will differ as this is based on your profile name, mine is “gmail” so I ended up with g69ap5lc.gmail.

Be aware you have to shut down the Firefox instance first, because it locks the file. Make sure your privacy settings won’t erase it all when you shut it down! I had to change mine to “Remember history” first.

Next you need to find and grab the timestamp. This can be a chore if you don’t have the full URL. I was looking for the one from spiffie.org below.

The column we are interested in is last_visit_date which is 1261169238197827 in our case. You can also list all the recent visits from the moz_historyvisits table with the id column.

Now we need to convert that timestamp into something we can read (unless you are a super UNIX geek and can read timestamps). This instance is too precise for the date command, so lop off the first 10 digits and use that, so in the example we use 1261169238.

Not short and sweet, but it works.

Thursday Quote: Flobots

December 17, 2009 » Uncategorized

“There is a war going on for your mind.
If you are thinking, diagnosis you are winning.”

– Flobots, We Are Winning on Fight With Tools

Tags:

F@H Team Statistics Scraper

December 11, 2009 » Geek

I created a team for Little Filament on Folding@home. Our team number is 172406 (in case you want to join), but I wanted to add our latest stats on the Little Filament site. As far as I can tell there is no API for the stats, so I worked up a scraper in bash.

Basically all it does is fetch the page, then grep and sed it’s way to the variables, finally dumping them into a json file (for easy JavaScript consumption).

The kicker is that the stats server is overloaded or down a lot, so we can’t rely on it and we don’t want to stress it out further. My decision was to poll it at a large interval, 12-24 hours. I don’t have enough clients on the team to exact significant change over 6-12 hours, but I don’t want to fall too far out of date either. So if the server is overloaded and drops it once or twice, not a big deal.

Without further ado, here is the script.

That cranks out fah_check.json, which looks like this:

To see it in action, check out the Little Filament Folding page.

ThirtyDayList.com

December 11, 2009 » Geek

I just pushed out my first Ruby on Rails application a few days ago, and the shakedown cruise is going well.

You can check it out at ThirtyDayList.com if you want. There are still some features I want to add and it needs to be DRY’d out, but I’m happy with it.

I used the book Rails for PHP Developers which was pretty good and brought me up to speed without much fuss.

I have to say, I’m really digging Ruby and I’m really digging Rails. It’s nice to not really have to worry about all your database stuff, ActiveModel takes care of the hard parts.

Tags: ,

Thursday Quote: Josh Jones

December 10, 2009 » Uncategorized

“…for those of you who like your Internet reading where God intended it to be, find in pine, cialis this post basically says we…”

– Josh Jones (Dreamhost Newsletter v8.12)

Tags: