We tried it: Bullitt (with BionX electric assist)

Originally posted on Hum of the city:

Hello, Bullitt!

While we were in Portland, we rented bikes from Splendid Cycles for the week. They knew the geography of San Francisco, and their suggestions were that we try riding a BionX-assisted Big Dummy and a BionX-assisted Bullitt. The Big Dummy was an obvious choice, beloved of hilly-city families up and down the west coast, but the Bullitt was a dark horse if there ever was one. The Bullitt is a serious cargo bike, the choice of San Francisco bike couriers, and it can carry a lot of weight. (Here is a great review by Josh Volk of Slow Hand Farms, whom we later met, and another from Wisconsin, and another from a dad in New Zealand.) However both a quick once-over and a detailed review by Totcycle made it clear that the standard Bullitt setup is so narrow that carrying two older kids at once in its box…

View original 2,931 more words

This is not the nastiest perl I’ve ever done…but dang.

This is a stanza where, given a comma separated list of keywords to match on, find the values after the colon. The values could be empty and at the end of a line. I would be delighted to find an even simpler way to do this.

   my $matcher       = " (".join('|', keys %option_map)."):";
   my @matches       = grep( /$matcher/, @lines);
   for my $match (@matches) {
      my @parts      = ($match =~ m/( *[^ ]+):( \S+ [^ #]*)(?! #|\S+:)/g);
      for (my $i=0; $i < @parts; $i+=2) {
         $option     = $parts[$i];
         $option     =~ s/^\s*(.*)\s*$/$1/;
         if ( defined $option_map{ $option } ) {
            my $value = $parts[ $i + 1 ];
            $value   =~ s/^\s*(.*)\s*$/$1/;
            $option_map{ $option } = $value;

And that’s pretty darned terse for that solution.

Resilvering: Just what I want to see

I love replacing failed hard drives. Mostly, because I hate having hard drive failures.

root@cholla ~
$ zpool attach -f tank ata-ST2000DM001-9YN164_W1E16BJB ata-ST2000DM001-1E6164_W1E5W99Y

root@cholla ~
$ zpool status -v
pool: tank
state: ONLINE
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri Feb 21 08:41:52 2014
440M scanned out of 2.19T at 55.0M/s, 11h35m to go
217M resilvered, 0.02% done

tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
ata-ST2000DM001-9YN164_W1E16BJB ONLINE 0 0 0
ata-ST2000DM001-1E6164_W1E5W99Y ONLINE 0 0 0 (resilvering)
mirror-1 ONLINE 0 0 0
ata-ST2000DM001-1CH164_W1E15D5G ONLINE 0 0 0
ata-ST2000DM001-1CH164_W1E16ACY ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
ata-OCZ-VERTEX4_OCZ-8O3625YQSVR0993K-part2 ONLINE 0 0 0
ata-OCZ-VERTEX4_OCZ-8O3625YQSVR0993K-part3 ONLINE 0 0 0

errors: No known data errors

And there we go!

uh…remind me how to begin a perl script?

Don’t let me forget to do this at the start of my perl scripts at work:

package main;
use strict;
use warnings;
use Carp;
$SIG{ __DIE__ } = sub { Carp::confess( @_ ) };
use Scalar::Util; #::looks_like_number;
# Un-buffer output
$| = 1;
# this is pedantic necessity for the following use statements
use lib '/home/lanforge/scripts';
use LANforge::Endpoint;
use LANforge::Port;
use LANforge::Utils;
use Net::Telnet ();
use Getopt::Long;
use Socket;
use POSIX;

PH7 Engine – is it really the fix?

This sounds very useful, especially if you consider that PHP is used in embedded environments like MonoWall and pfSense.

My big question for larger installation is this: xcache already does a great job at bytecode caching. The largest slowdown in the majority of PHP applications is the relational engine sitting underneath it. After much profiling of previous applications, I have always found the biggest benefits to application performance in taking a casual schema to a rigorous level. And if that is not fast enough, then you throw in some memcached to the mix.

PH7 Engine.