Using 960.gs, Haml, Sass, and Compass on Blogger

I tried to see how many cool toys I could use to create my own blogger template. So far I have: 960 Grid System for a nice 2 column layout. Haml for the unstyled template. Sass for style. Compass and Rake to tie it all together. You can find the result on github, here. Any readers who have noticed a similarity in chosen technology to those used by Katello get bonus points! »

Retrofitting drop shadows into existing Android layouts

I had some UI elements in an Android application I’m working on that felt as if they should be above (pushing out of the screen, rather than to the top of it) the elements that followed them in the UI. A good way to indicate this is with a drop shadow, similar to those on Android title bars or Action Bars. An existing method didn’t work for me, as my UI is relying heavily on weights to keep proper size ratios between the elements I wanted to add a drop shadow to, and the element they would be casting a shadow on. »

Micro USB for Power Everywhere

One of the reasons I’m very excited for Rasberry Pi is that it uses micro USB for power. This is also the standard may cell phone manufacturers are settling on for charging. I would love to see more every day devices use micro USB for charging and for power. Granted, not all devices can run off the 100mA from USB 2.0 (or charge at a reasonable rate), but I can eliminate just one more of those odd coaxial chargers, I’d be a happy fellow. »

Essential Gnome Shell Extensions For Laggards

[](http://upload.wikimedia.org/wikipedia/commons/6/6f/Terminal-dec- vt100.jpg) My ideal workstation __Image by ClickPick, used under the ____ Creative Commons Attribution-Share Alike 3.0 Unported license. __ Gnome 3 introduced a lot of fundamental changes to how you interact with your computer. I don’t want to hopelessly cling to the past, bemoaning the loss of my Lisp based window manager and yearning for the days when I could debate the merits of pure applets vs notification area icons, so I’ve moved on to gnome-shell. »

Android ProGuard and Git Tip

If you’re obfuscating your Android applications using ProGuard, make sure to keep the proguard/ directory at the root of your Android project under revision control. This may seem contrary to what you’d feel like doing, as the files are autogenerated, but it will help if you ever need to debug a stack trace from your published application. Typically when I’m ready to release, and after I’ve done every other change, I will bump the revision in my AndroidManifest.xml and generate a new .apk from eclipse, then test it out on my device. »

My .gitconfig - 2011 Edition

It’s been just shy of five years since I first blogged about my .gitconfig file, so I figured now would be a good time to revisit it. If you’re not already aware, you can set git configuration values in a .gitconfig file in your home directory, and have them apply to all git repositories you work on. This is particularly useful for aliases and to set your email address. My current .gitconfig: [user] name = James Bowes email = $EMAIL_ADDRESS [alias] ci = commit -a co = checkout st = status praise = blame br = branch diffstat = diff --stat cat = !cat @ ds = diff --stat lol = log --graph --decorate --pretty=oneline --abbrev-commit lola = log --graph --decorate --pretty=oneline --abbrev-commit --all [apply] whitespace = warn [diff] rename = copy renamelimit = 600 [pager] color = true [color] branch = auto diff = auto interactive =auto status = auto [push] default = upstream [github] user = jbowes token = $GITHUB_TOKEN I cribbed _lol _and lola from Adrian. »

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. »

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. »

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. »

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. »