Skip to content

Replacing Unity’s run command with gmrun

Unity’s “execute command” and “launcher” are terrible.  After they took over the ALT+F2 key combination on my upgrade to Ubuntu 11, I’ve been suffering and missing the gnome run command.  I use the run command all day to add entries to my automated weekly report as I complete them.

(Continued)

Reporting Guest IP address and status from VMware ESXi

We’ve been using ESXi at work for a while and have around 40 images now (mostly developer playgrounds, etc).  Since they are temporary we usually use DHCP addresses and they can change over time (especially after a power outage…).  Previously I dabbled in getting info out of esxi and now I’m “wrapping” that up.  I wrote a wrapper for vmware-cmd to report on all (or some) of the images and hopefully tell me their IP address. (Continued)

Chrome Extension Spyware?: Smooth Gestures

Yesterday I noticed a chrome extension I was using was phoning home with information.  I submitted a bug report and screenshot along with around 40 other people over the next day.

Google moved pretty swiftly to take it out of the extensions marketplace and shortly after that the code.google.com site was taken down (http://code.google.com/p/smoothgestures-chromium/) saying “Your client does not have permission to get URL /p/smoothgestures-chromium/ from this server. That’s all we know.”  Below are some of the more interesting comments that were pouring in.

(Continued)

Google Usernames/Gmail Addresses with Dots

Apparently Google doesn’t care how many dots you have in your username.  I’ve noticed some form spammers using lot’s of dots in their addresses in different places to get around the unique email address requirement most sites have.

Not sure how I feel about this feature.  I wonder if there is a Dan Goldman with dan.goldman(at)gmail.com and how he he would feel about getting mail at dang.old.man(at)gmail.com

Of course there is also the “plus addresses” which is a feature I like.

Multiple Postgres Instances on one Machine

First crack at getting multiple postgres clusters on the same machine using separate (virtual) interfaces and listen_addresses resulted in an error like this when bringing up the second instance.

-bash-3.2$ FATAL:  lock file "/tmp/.s.PGSQL.5432.lock" already exists
HINT:  Is another postmaster (PID 873) using socket file
"/tmp/.s.PGSQL.5432"?

Obviously, you could change the port but then you would have to specify that everywhere.  The conflict is actually because of the unix socket file. Setting a different unix_socket_directory for each cluster resolves it and you can have app1.dbtest.org:5432 and app1.dbci.org:5432 on the same box

vmware-cmd

Quick reference for vmware-cmd

/usr/lib/vmware-vcli/apps/general/credstore_admin.pl add -s server.domain -u root -p ‘xxxxxx

This adds the credentials for your server to ~/.vmware/credstore/vicredentials.xml

vmware-cmd -H server.domain -l

#this should now list your vms without prompting for a username or password

vmware-cmd -H server.domain /imagepath.vmx getstate

# this should list the current state of your VM

Linux time command for scripts

I sometimes like to do some quick performance tests using ‘time’ (the linux command).

The default format is usually not so handy for quick scripts since it breaks down into hours and minutes which isn’t numerically sortable.
(Continued)

Solved: Multisite WordPress Proxied without Infinite Redirects

I was setting up a multisite/network wordpress (3.0.1) install and started running into an infinite redirect problem.  (Firefox reports this as “The page is not redirecting properly”).  Although I’ve done this before, the twist on this install was that I was proxying it from another server. That is, I wanted the url to appear as http://publicdomain/blogs/user1 but to be served from a separate privateserver

Quick Answer

Set the ‘Host’ header that privateserver sees when handling blogs.  I did this by adding RequestHeader set Host publicdomain to .htaccess in the blogs directory. (Continued)

Paintball: Barrel Cam

This past Sunday I organized a paintball trip.  I brought along my brand new action camera and 23 friends to shoot.

Camera

The camera (Oregon Scientific ATC9K) is waterproof to 20m and shock-resistant so I expected it to survive paintball.  I’m no stranger to waterproof camera’s, my Stylus 790SW has served me well in Peru, at the beach, and in Florida’s Springs.  But I was looking for something that could shoot a lot of HD video and survive deeper water.  The feature that really sold me, was the G-sensor which I plan on using for motorcycling.

Mounting

They include a handlebar mount for cycling and I used that to fit it on the barrel.

(Continued)

One-Liner: set operations with sort and uniq

Doing set operations in the database is easy enough but what about on the filesystem?

Every once in a while I need to compare lists of things outside of a database, taking the intersection, union, or subtracting one set from another.  sort and uniq are easy enough and you can just about write a one-liner to do it.

Given the following sets:

$ cat setA
SMITH
JONES
DAVIS
TAYLOR
$ cat setB
SMITH
WILLIAMS
BROWN
DAVIS

We can get the intersection:

$ cat set* | sort | uniq -d
DAVIS
SMITH

(Continued)