https://www.gravatar.com/avatar/ffa68a092e250fa39e9680419592aa6e?s=240&d=mp

Stupid OpenWRT ipv6 tricks

So, if you’re like me you find yourself wondering why your broadband provider has a /32 IPv6 prefix assigned, and yet chooses not to use it, forcing one to either be IPv4-only (how 20’th century) or use an IPv6-over-IPv4 tunnel solution.

Fortunately there is a simple and free solution out there, courtesy of Hurricane Electric’s rather fabulous tunnelbroker service. Obtaining an IPv6 prefix and setting up the tunnel is covered, extensively, so I won’t go into it. It’s also rather easy to set the tunnel up on an OpenWRT based router, like mine. The default setup is rather nice, but there are some changes you can make to your router configuration that will make it even nicer.

Currying Patterns

One of the most dangerous books I’ve ever even partially read is MJD’s Higher Order Perl. In particular, its description of subroutine currying – that is, building more specific functions out of more general purpose ones – is a pattern I find incredibly useful. The other day I found myself writing a number of routines that were surprisingly similar… kinda. They all implemented a common pattern, but across routines that were rather… different.

MX::AttributeShortcuts -- now with Moo-style type constraints

I just released MooseX::AttributeShortcuts 0.028; it incorporates Moo-style type constraints. …largely because I needed to relax, and wrote MooseX::Meta::TypeConstraint::Mooish :) That means you can now pass a coderef to has() in isa that, like with Moo, dies on validation failure and lives on validation success: -- 1 2 3 4 5 6 7 8 # easiest is via AttributeShortcuts use MooseX::AttributeShortcuts 0.028; has foo => ( is => 'rw', # $_[0] == the value to be validated isa => sub { die unless $_[0] == 5 }, );

Intel 7260AC Bluetooth [8087:07dc], Ubuntu, and the Thinkpad T440p

This requires a little magic, unfortunately; either the driver, system, hardware itself, or some combination thereof do not operate well with autosuspend enabled. Disabling autosuspend for this device does appear to resolve dropped / corrupted / weird bluetooth issues. Based on my googling, I do not believe this to be Thinkpad-specific, rather something the Intel 7260AC firmware isn’t handling properly at the moment. FWIW, I’m running Ubuntu 13.10 (saucy) on the thinkpad in question, and 12.

docker without password prompting

Just a little snippet.┬áThis should be pretty obvious to those familiar with how sudo functions, but it’s easy to run docker commands with sudo without being prompted for your password by configuring sudo to not ask for it. Note that the normal warnings and red flags apply here. If you install the above as /etc/sudoers.d/docker, then the user rsrchboy (line 1) and any user in the docker group (line 2) will not be asked for a password when running “sudo docker …”.