Wednesday 30 November 2011

BTRFS and KVM

If you're like me, you've spend the last year wondering why your KVM based virtualization is horribly slow when doing IO. You've tried twiddling every available option in your BIOS, you've mucked about with hdparm  and libvirt/qemu settings, and you've run more timed installs of RHEL 5 than you care to admit.

If you're also like me, you tried using ext4 instead of BTRFS to store your guest images today, and found that this resolved your issue.

The relevant bz appears to be here.

The lesson I learned today is to blame experimental or newer features before anything else (though its doubtful I'll remember this next time).

Monday 28 November 2011

Importing VPN Settings in GNOME 3

I've noticed after upgrading my workstation to Fedora 16 that GNOME 3's default NetworkManager UI doesn't expose the old UI's import option for VPN settings. I have my old OpenVPN settings file on hand, so I'd rather not type it out again.

Turns out you can still access the old UI and its convenient import button by running nm-connection-editor.

Friday 25 November 2011

CPSN v0.8.0

This is just a quick update to CPSN, fixing detection of stale cookies. It will also prompt you for a username and password if you forget to put one in the settings file (or don't want to save your password on disk).

Install it with gem install --user cpsn
Check the included README for details on configuration.

Git: https://github.com/jbowes/cpsn

Note: Using CPSN probably violates any number of Terms of Service, etc. Use at your own risk.

Thursday 24 November 2011

A PEM Backed Keystore for Java SSL

For Thumbslug, we needed to open a number of SSL connections to the same server, each with its own X.509 client certificate. Thumbslug grabs the certificates from Candlepin, which stores them in PEM format. Rather than teach Candlepin to also store these certificates in a different format, or to load them first into a format that Java deals with nativley (like PKCS #12), I figured it would be best to create an SSLSession backed directly by an X509Certificate and PrivateKey loaded from the PEM file.

I wasn't able to find any other examples of a PEM backed Java KeyStore, so here is mine (backup), and the code that uses it (backup). Since PEM is still widely used (by OpenSSL, for example), hopefully others can make use of this.

Monday 21 November 2011

CPSN v0.7.0

I've finally gotten around to fixing up cpsn to work against Sony's latest website version. CPSN is a cli app that lets you check if your PlayStation Friends are online, and what games they're playing so you can, for example, see if anybody is playing Call of Duty without leaving the comfort of your shell.

Install it with gem install --user cpsn
Check the included README for details on configuration.

Git: https://github.com/jbowes/cpsn

Note: Using CPSN probably violates any number of Terms of Service, etc. Use at your own risk.

New blog address

I've moved my blog here, to blog.repl.ca. If the move ends up spamming any blog syndicators / aggregators, I apologize.

HOWTO Make a USB Y Cable for Host Mode


Many smartphones or tablets support USB host mode (or On The Go mode) with an adapter. Unfortunately, a lot of those devices don't supply power to their client USB devices; you can't just plug a host mode adapter into an HP TouchPad, for example, then plug a keyboard into the host mode adapter, and expect everything to work.

I put up a video on youtube explaining how to build and use a USB Y cable to inject power to the client devices. If you'd like, you can watch it here