paxed: It's a Hand! (Default)
2011-05-26 05:30 pm
Entry tags:

Rescue corrupted Firefox visited pages history

Sometimes Firefox can corrupt the visited places history database, or places.sqlite. This is a simple way to get almost all of those back:

First, close Firefox, and go to the profile dir, like ~/.mozilla/firefox/xxxxxxxx.slt.
Check that you have places.sqlite, and you should have the old database file as places.sqlite.corrupt. Then do the following:


strings places.sqlite.corrupt | grep ^http | cut -d'"' -f 1 | cut -d"'" -f 1 | sort | uniq | sed -e 's/^/insert into moz_places (url) values("/g' -e 's/$/");/g' | sqlite3 places.sqlite
paxed: It's a Hand! (Default)
2011-04-09 02:58 pm
Entry tags:

xosd and aumix

a script for volume adjustment, with on-screen display. Uses aumix and xosd.


#!/bin/sh
aumix -v"$1"
DAT=`aumix -q | head -1 | awk '// { print $2 }' | sed -e 's/,//'`
osd_cat -b percentage -p middle -A center -d 1 -P "$DAT"