ihashacks

i dunno

Dell Search Plugins for Firefox

Being a Dell reseller I frequently find myself looking up service tags and parts on the Dell site. So much so that I decided to create some search plugins in Firefox to help speed up this process.

Download those and save them in a “searchplugins” directory in your Firefox profile directory. If “searchplugins” doesn’t exist then create it.

Open-audit

I am very happy to have been working on the Linux auditing script for the Open-AudIT project. It started off as a script posted on the Open-AudIT forums by user a.arenas. It supported basic system info, networking, bios and processor info. I extended it to support:

  • local users
  • system services (sysv, upstart, and xinetd)
  • installed packages (RPM and APT based)
  • IP route information
  • better handling of virtual hardware in Hyper-V, KVM, and VMware
  • listing of Samba shares
  • swap info
  • logrotate log files
  • network adapter speeds

Mark Unwin was awesome enough to incorporate it into Open-AudIT as of release 1.0.3.

I’m excited to now have packaged it all up in a PPA supporting Ubuntu 12.04, 12.10, 13.04, and 13.10:

1
2
3
add-apt-repository ppa:ihashacks/open-audit
apt-get update
apt-get install open-audit-server

After that fire up “http://myserver/open-audit” in a browser and enjoy!

(coming soon… “open-audit-agent”)

Ppa Madness

Upgrading one of my laptops to Saucy was easy and has so far been very pleasant and mostly stable. Unfortunately there are some things that I like that haven’t been updated or patched the way I like them (at least not yet):

  • Indicator Workspaces is a handy app indicator to signal which desktop you’re on (I use a 3x3 grid so reminding me which one I’m on is handy for navigation).
  • NotifyOSD is the daemon used in Ubuntu and others to display “toaster” style notifications from applications and events. They look great, but I can’t stand that there is no way to dismiss a notification and that hovering the mouse simply makes them fade in and out. Fortunately, a patch has been written to correct this behaviour.
  • NotifyOSD Configuration is a tool that allows for easy configuration of NotifyOSD.
  • TLP is a daemon that responds to various power events and adjusts system performance accordingly. While Ubuntu does this out of the box and has a sophisticated framework for configuration, TLP simplifies power management with a set of sane defaults and an easily readable configuration file.

Fortunately, this is Free software and I can patch ‘em, package ‘em, and ppa ‘em however I want:

https://launchpad.net/~ihashacks/+archive/forwardports

1
2
add-apt-repository ppa:ihashacks/forwardports
apt-get update && apt-get upgrade

Check-dell-warranty Update

The check-dell-warranty script has been separated from my other Nagios junk. I have made it a “1.0” release. It is now a project on Launchpad and has a PPA there as well.

Tor Patch for Log in Tmpfs

For a number of security and performance reasons I tend to put /var/log in tmpfs in RAM (at least on machines where I either don’t care about logs or where syslog is forwarded to a central server).

That practice can sometimes cause issues with services that requires a particular file or folder in /var/log when the service starts at boot. Tor is a perfect example as it looks for /var/log/tor at boot and fails to start if the directory does not exist.

Bluetooth Fun

I spent some time tonight with blueproximity, empathy dbus, a blueproximity patch, an NFC tag enabling BT on my phone, and these guys:

Misc IP and DNS Stuffs

Here’s some misc IP and DNS related scripts helpful in converting X to Y:

Convert a BIND DNS zone to a local hosts file:

Convert a DHCP lease to a reservation:

Geek Code

After reading ESR’s home page I decided it was time to make a geek code of my own:

Fun With Geoip and Profane Weather

A recent tweet from @climagic made me lol and gave me an idea to extend Ubuntu’s dynamic MOTD.

There some prereqs:

1
2
3
4
5
# command line tools
apt-get install links curl geoip-bin
#geoip database of cities
wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz                                                          gunzip GeoLiteCity.dat.gz
sudo mv GeoLiteCity.dat /usr/share/GeoIP/ && rm GeoLiteCity.dat

Now get the script:

1
2
wget https://raw.github.com/ihashacks/update-motd/master/97-vulgar-weather
sudo mv 97-vulgar-weather /etc/update-motd.d/

Now log out and back in, and voila! Vulgar weather at every login!

Vulgar Weather in MOTD

Zsh-ified Undistract-me

Undistract-me is a nifty little add-on to Bash that will automatically create a NotifyOSD dialog if a shell command has taken longer than 10 seconds. It does this by creating a hook before and after commands are typed into the shell. While this is really cool, I use ZSH and simply sourcing the code from Undistract-me is not an option.

ZSH already has preexec and precmd functions to trap these types of events. That makes porting this type of feature over to ZSH quite simple.

screenshot of zsh-notifyosd