Page 2 of 28
Making 1080p Timelapses with Lightroom
There are a bunch of tutorials for creating time-lapse videos in Lightroom. All of the ones I found only provide a preset for making 1280x720 (720p) videos. I took one of those presets and updated it to be make a 1920x1080 (1080p) video from stills.
Download this an add it to your Lightroom video presets. On Mac, this is located at ~/Library/Application Support/Adobe/Lightroom/Export Presets/Video/
. For Windows, see here[^1].
[^1]: Seriously not trying to be a dick, I just don’t fucking know and give zero shits
at(1) on Mac OS X
at(1) is a standard command in every Unix-like operating system that I know of, including Mac OS, for scheduling tasks to be run at a later time. Unfortunately, OS X doesn’t run (or even seem to have) atd(8), the daemon responsible for running at(1)-scheduled tasks. Complicating matters is the fact that at(1) is a very difficult to search for, because search engines strip such common words, so figuring out such issues can’t really be done with even the best searching. So here I’ll list other things that one might search for: atq, atrm, and batch, which are all part of the at(1) suite of tools.
My (likely vain) hope is that this post will spread a bit of knowledge and maybe catch searches, if someone’s searches match my description.
Anti-pull dog harnesses
I like dogs and recently got a beaglish one of my own from the Lost Dog Foundation. While wonderful, he has the affliction of walking excitement common to hunting hounds—appropriate to his name, Scout wants to lead the way and suss out any squirrels to be found. At only 25 pounds, he won’t drag you down the street, but the constant tugging on the leash is tiring. I’ve tried a number of collars & harnesses to try to combat this problem, and what follows are my opinions on them.
Illusion Collar
My girlfriend had been watching a lot of Caesar Millan before we got our dog and we put a fair bit of stock in his methods. Using a leash in the way that Caesar describes, well up the dog’s neck and close to the ears, allowed us to control Scout, but the leash wouldn’t stay there, so we figured it was worth trying the oddly-named[^1] Illusion Collar to make this easier.
While the Illusion collar does what it’s supposed to, keeping the operative part of the collar well up the dog’s neck for better control, this did nothing for Scout and he remaiined unruly on walks.
PetSafe Easy Walk Harness
I’ve found this harness to be by far the most effective. The harness has a circle of straps around the dog’s body, just behind their shoulders and a strap across the dog’s chest. The front strap has a cinching portion to which the leash clips, tightening a bit when the dog pulls. More importantly, because the attachment is on the dog’s chest, the force of any pulling turns them sideways, greatly limiting thier ability to pull.
The downside to the Easy Walk is that the strap behind the dog’s front legs can rub their fur-less armpits raw, as I’ve found with Scout and other friends have reported.
Freedom No-Pull Harness
This is set up similarly to the PetSafe Easy Walk mentioned above, but with additional versatility. Like the PetSafe it has an attachment point on the dog’s chest, with all of the noted advantages & disadvantages, though the front attachment on the Freedom No-Pull isn’t cinching. Where it does have a cinching attachment point is on the dog’s back between their shoulder blades. Using this attachment doesn’t provide nearly the pulling prevention of the front attachment, but it does keep from driving the underbody strap into the dog’s armpits and chafing them.
The intended arrangement is to clip a leash into both attachments and use it like a horse’s reins—tug on the front one when the dog pulls to correct the behavior. This is effective, but it does halve the length of your leash.
[^1]: The Illusion collar is named after his estranged wife Ilusión
GORUCK Challenge
Photo credit: Troy Angrignon
I did the GORUCK Challenge last weekend. The GORUCK Challenge is a 12 hour guided tour of a city, led by special forces guys known as the Cadre. Every challenge, even in the same city, is a different experience, tailored by the Cadre based upon their desires, the folks on the team, and what the city has to offer.
Class 662 Summary
A team of 34 people, each with a 45-55 pound rucksack hiked & ran 20 miles around San Francisco over the course of 12 hours. We were accompanied by two 30 pound bags of quarters, a ~100 pound log, and, for about half of the time, a ~300 pound couch adorned with a 210-230 pound person. In the last few hours, we swapped the couch for a pair of 250 pound logs.
Difficulty
Overall the event was a ton of fun. Having read numerous things in the weeks leading up to this, my first challenge, I had gotten a bit worried. The number of people who listed this as the hardest thing they’d ever done and hinted at the misery they endured made it sound like a rough, “Well, I’m glad I did that. Once.” sort of thing. Nothing could be further from the truth. If you’re physically capable, you’ll have a good time until the end.
What do I mean by capable? I don’t think a single test other than the Challenge itself (or perhaps doing a Light and saying it was easy) could make it clear, but I can put it in CrossFit terms. CrossFit + weight lifting is my main regimen, 3-4 days a week at Patriot CrossFit in Arlington if you want to get an idea of the programming. I’m certainly no firebreather, but I manage to do a majority of the workouts as prescribed and in fairly good time. If you can follow the main site, doing half of the workouts as prescribed without being horribly slow, you’ll be fine. You need not be Jason Kaplan to be in good enough shape—my 7 minute Fran is enough to make the Challenge a non-killer event.
Notes on Preparation
Hydration
I say hydration here because I think something more than water is important. I used a low-profile SOURCE bladder which fit well in the main compartment between my bricks and the main flap. I filled it with water and 6 Nuun tablets initially, and tossed in a few more tablets when I refilled at around 0300. We didn’t stop for water again and I was out near the end of the challenge, along with most of the team. If my next Challenge is anywhere warmer, I’ll find a way to have a second bladder or even a couple of Nalgenes.
Food
I often deride cyclists for their obsession with fast carbs, thinking that without sucking down maltodextrin every 20 minutes they might just go from being a world-class überathelete on their Yellow Polkadot Single Baller Edition Cervélo to a prole riding a Mongoose. But it is to cyclists whom I turned when gathering supplies for this challenge. In the end, I downed seven gels and two packs of chewie jobbies throughout the 12 hours. Are those absolutely necessary? Not at all, I could have gotten through without any of that and gone strict paleo with some bananas or some such. But it would have sucked. Having good blood sugar support after glycogen stores are depleted increases your ability to perform for sure; more importantly, the carbohydrate combined with caffeine improves mood, keeping the event from being a gruelling death march.
So hit up your local bike shop and get some of those goofy fast acting carbohydrate sources. I had a couple of Honey Stingers (which are mostly honey) but most of what I brought were caffeinated (35mg or 70mg depending on the flavor) Gu Roctane energy gels. I drink tea regularly, so I think the regular-strength (35mg) ones were best for me. Next time I’ll probably bring 10 gels along with a bunch of the chewie versions. The chewies are amazingly delightful after you’ve speed marched across the city. If you’re the prepared sort, it’d be good to bring some extra. Even amongst such a rarefied group there are knuckleheads who bring little to no food. If someone’s performance falls off, a caffeinated gel is a great way to bring them back.
I also brought a few bars (Luna or UberFood, I think) but only ate one. It’s nice to have something different during a long break (5 minutes).
Clothing
This challenge was during June in San Francisco. For those who don’t know, that’s winter. Paradoxically, it wasn’t windy or foggy that night, but it was a bit cold.
I wore Under Armour leggings, some Champion workout shorts, Drymax socks, a padded football shirt, a long-sleeve Under Armour Cold Gear top, and a workout shirt over that.
Unsure of my shoe choice up until the day of The Challenge, I settled on Inov8 F-Lite 195s. I’ve been wearing minimalist shoes (Merrel Trail Gloves are my favorites) exclusively for a few years now, but I was concerned that the extra weight on my back would lead to a Bad Time for my feet & knees. I had bought some F-Lite 230s which were what I had planed on until the day of, but I settled on the 195s because my feet feel better in them. They were just fine, despite the weight and surfaces we were walking on.
The other thing you need to do is tie your shoes properly. If you can slip your shoes off without untying them, they aren’t tied properly. We had to stop multiple times during our first time hack in which we needed to cover 3.5 miles in 35 minutes due to shoes that came untied or got flat tired. Properly tying your shoes completely prevents both of these and will keep your teammates from thinking you’re incompetent from the beginning.
Pockets. You want pockets. Movements are often an hour or more, during which time you don’t have opportunity to dig around your pack for the aforementioned sugary delights. Every time you stop, ensure your pockets have a gel or two in them. Pockets are also where you’ll shove the trash after you down one of those as cadre are strict about littering, rightly so.
Your Ruck
Do something to your ruck so that you can differentiate it from everyone elses. All cadre are different, but you’ll end up taking your ruck off and passing it to teammates at some point in the night, and if they all look the same, it’s impossible to find your own. I had a light-colored War Stories & Free Beer patch so that I could identify my GR1 from the back; the loops of cord that I use to hold my hydration tube makes it notable from the front.
Having a black Omega carabiner clipped through three MOLLE sure does look cool, but it’s not particularly funcitonal. I have one on my ruck and it’s nice for briefly attaching a water bottle or my bike helmet, but it’s really difficult to remove for other uses. When your ruck is jammed full of bricks, water, and yoga blocks, you can’t manipulate the fabric enough to remove the ‘biner easily, so save yourself the hassle and have it only clipped through two loops so that it’s faster to get at.
Other Junk
Minimize it, but don’t go crazy. There are endless words written to the effect of “if you’re not sure, don’t bring it”. I largely subscribe to this mentality, as you most likely aren’t going to need things, but there’s a dose of realism that is needed here. Between the 30 pounds of bricks and the 10 pounds of water and misc that are the minimum weight, you aren’t going to notice a few extra food bars, gels, or a windbreaker, so don’t sweat it. If the weather is on the edge of being cold, bring the windbreaker. I always carry a Sharpie & a pen in my ruck day to day and was sad that I didn’t have them when we needed to write things down.
Things to certainly not bring are those that will absorb water. Carrying around a small portion of your local body of water is a bad time.
Packing Bricks for the GORUCK Challenge
I have finally signed up for a GORUCK Challenge. The event is 6 months off, but thanks to Jason posting Wrapping Bricks Explained I’ve been playing around with packing bricks in my rucks.
I followed the instructions on the above mentioned post for wrapping the bricks in pairs and took Asha Wagner’s advice for securing the bricks in a GORUCK pack using Sea to Summit ¾" straps to secure them on the ruck’s internal PALS webbing. To the right are two pairs of bricks (4 total) in a GR Echo.
I’m pretty light, just under 150 most days, so 4 bricks is the prescription. A yoga block is the perfect thing to fill the extra space—dense but soft and about the size of two bricks. One note is that you can indeed fit 6 bricks into a GR Echo, with just a bit of room to spare. The third package of bricks takes the place of the yoga block, with a bit of space on either side. Unfortunately, there isn’t nearly enough space for a hydration bladder along with them. If you’re taking 6 bricks to the Challenge, get a GR1 or Radio Ruck.
Tough Mudder Mid-Atlantic 2012
After not doing Tough Mudder since 2010, I signed up for the Mid-Atlantic event this year. Here’s my advice for folks looking for tips before running.
Over the past few years I’ve exercised almost exclusively in Vibram FiveFingers mainly because I feel so much more stable when running & jumping. Since switching to minimalist street shoes for everyday wear (Merrell Trail Gloves and New Balance Minimus) my knees, hips, and back seem happier. Last time I did Tough Mudder, I wore some old cross-trainer style tennis shoes, but by this point I’ve gotten rid of all the thick-soled tennis shoes I once had. I ended up wearing my New Balance MT20s for the run and they worked very well. Clearning them after the race was just a few minutes of hosing them off outside and then tossing them in the washing machine.
I wore some Mechanix gloves (the basic velcro cuff model) the first time I did Tough Mudder. This time I brought some along but chose not to wear them. There are only a couple of obstacles for which you might want them, and I don’t think those are sufficiently abrasive or splintery to extra mudweight you carry in gloves. Focus on wearing as little clothing as possible—the first time you hit a mud pit your shirt & shorts carry a lot of it with you.
Training is another big question that people have. Mine is pretty much the same as previously: I do CrossFit 2-3 times a week and 1-2 days a week of Olympic lifting. In the 6 months prior to doing Tough Mudder I went on a couple of ~3.5 mile runs. The only other running I did was the occasional CrossFit WOD that involved a 400 or 800 meter run. I think that pretty well drives home my admonition that you don’t need to run a lot to be a competent runner and perform well in endurance running events.
Having said that, this Tough Mudder was the same as last—85% of the people walk the majority of the event; another 10% run between half of the obstacles. Running the whole way easily puts you in the top 5% of participants. Aside from being well prepared physically and highly self motivated, the best way to run the whole way is to do it with a group of friends.
Crumpler Haven With Canon 40D
I recently picked up a Crumpler Haven to use for carrying my Canon 40D. I purchased the medium size with some trepadation, as their size recommendations sugges that it won’t fit anything larger than a compact SLR (Canon Rebel, Nikon D3x00). It seems that th suggestions are too conservative—my 40D fits just fine with the Canon 10-22mm or 17-55mm affixed and leaves enough room for a 50mm alongside. You can’t fit two big lenses, like the aforementioned zooms, in the bag simultaneously, but you can reverse my setup (50mm on the camera, bigger lens beside it).
The Haven has proved quite nice. It’s enough on its own to toss in the car if I don’t plan on walking much in my journey. More importantly, it fits perfectly in a GR1 beside a liter of water.
Replacing an E36 Window Motor
There are enough BMW E36 cars out there owned by enthusiasts that nearly any problem you have there is a do-it-yourself tutorial for fixing on the internet. Dead window motors is no different–Doug Vetter has a very detailed description of how to replace the window motor & regulator on the E36. Seriously, if you’re going to to do this fix (or are wondering whether you should), go check out Doug’s page. The only amendment I’ll make to his description is about replacing the window motor only, without removing the regulator. In short, doing so is possible, but a (cheap!) special tool is required.
Doug’s instructions mention that a low-profile ratchet is required to remove the window motor with the regulator in place, and when he says low-profile, he means it. I bought one of these cheap ratchets on Amazon in preparation for this job. While it doesn’t have the requisite T-30 bit, this style of ratchet is the only thing that will fit in the space between the door and de-riveted window regulator. Check your local hardware store for the T-30 bit–regular old interchangeable screwdriver bits fit perfectly. Beyond that, follow Doug’s instructions for breaking the window regulator rivets, use your $9 ratchet to unbolt the motor, and bolt the shiny, expensive new motor in its place. If you’re handy, you’ll be done in an hour.
Perl and Dubstep
In the past year, I have come to quite like dubstep, a burgeoning electronic music genre. Perhaps this is a more interesting introduction than an article. Dubstep’s current phase reminds me of generalized techno (mostly house & dance) during the mid-90’s–a huge variety of styles, many small artists, much of it distributed through non-traditional channels. In the late 90’s the distribution was via early filesharing networks, most notably Napster. For Dubstep, YouTube, Mixcloud, and Soundcloud seem to be the preferred ways of getting new tracks out.
To chronicle and share this growth of a genre, I started @DailyWub, a Twitter account that posts a new dubstep track every day. Being an engineer, I found the idea of manually keeping a queue and posting a track every day to be a dreadful task. For some time, the account has been powered by Buffer, a simple webapp that allows you to create a queue of tweets that are metered out at a schedule of your choosing. Buffer is ok, but they limit the queue to 10 tweets, and at some point started shortening URLs even when not needed, which breaks the YouTube thumbnails in many Twitter clients. Having a queue that is regularly plucked from and emitted to Twitter is a fairly simple operation, so I wrote my own program to do it–Net::Twitter::Queue.
Net::Twitter::Queue is a simple Perl module that employs Net::Twitter to do the heavy lifting. To use it, I have a queue of tweets in a file, tweets.yaml
:
- Caspa - Where's My Money? http://www.youtube.com/watch?v=myZU2DZoD9w - Skrillex - First Of The Year http://www.youtube.com/watch?v=2cXDgFwE13g - Rusko - Everyday http://www.youtube.com/watch?v=xDAX2aVWAag
When run, Net::Twitter::Queue will remove the top item from that YAML file and post it to Twitter using the account information specified in config.yaml
:
consumer_key: [consumer_key] consumer_secret: [consumer_secret] access_token: [access_token] access_token_secret: [access_token_secret]
Where do those values come from? Two places: the consumer information is on the page for your application at dev.twitter.com (go ahead, make one!) and the access tokens are specific to the account you want to post as. To generate them, I used Twurl. With the consumer key & secret in hand, simply run Twurl:
Titus:~/$ twurl authorize --consumer-key [consumer_key] \ --consumer-secret [consumer_secret]
Twurl will respond with a URL that you can visit in a web browser, login to Twitter with the account you want to post as, and get a PIN back. Give the PIN to Twurl and it will complete the authentication process, saving the access token & associated secret in your ~/.twurlrc
. Grab those two, toss them into config.yaml
and run Net::Twitter::Queue from the directory that has config.yaml
& tweets.yaml
in it:
caligula:~/twitter/dailywub$ ls config.yaml tweets.yaml caligula:~/twitter/dailywub$ perl -MNet::Twitter::Queue -e \ '$q=Net::Twitter::Queue->new->tweet'
Easy as that–the top entry in tweets.yaml
has been popped and posted to Twitter.
Creating a Perl Module in Modern Style
One of the very best things about Perl is CPAN, a repository of modules to do everything from browse the web to manipulating image files. CPAN provides a consistent method for installing modules (install cpanminus and then cpanm <Module::Name>
) and the largest number of modules of all the scripting languages. More often than not, what you are trying to do has already been done and exists as a CPAN module. In the event you are doing something new, the best way to give back to the community and get free help is to encapsulate your work and distribute it as a module on CPAN.
Historically, creating a module suitable for general consumption was a confusing. Tutorials from years past abound, each one longer than the previous, and always employing a different toolchain, making synthesis of common concepts impossible. These days, however, things are much easier. In the past 6 years or so the Perl community has tried on a number of methods for building modules. The focus of this article will be a recent (circa late 2009…the Perl ecosystem takes a measured pace) build system, Dist::Zilla.
Whereas ExtUtils::MakeMaker and Module::Build are systems for building, testing, and installing a release, Dist::Zilla sits at a higher level. With Dist::Zilla, you create a single file that controls the build & test flow (using ExtUtils::MakeMaker under the hood) but also provide functionality for generating semi-boilerplate files (LICENSE, MANIFEST, META.yml) and releasing the code via CPAN. The configuration file, dist.ini
, is easy-to-read and short in contrast to prior build systems.
To start using Dist::Zilla, install it using the standard CPAN shell command (cpan -i Dist::Zilla
) or with cpanminus (cpanm Dist::Zilla
). You utilize Dist::Zilla through the command dzil
; if that’s not in your path (which dzil
), then you’ll want to find it and symlink it somewhere useful or add it to your path. Global setup of dzil is done by invoking dzil setup
and answering the questions it poses. With that done you can very easily mint a new distribution:
1 2 3 4 | Titus:~/sandbox$ dzil new Number::Cruncher [DZ] making target dir /Users/dinomite/Dropbox/sandbox/Number-Cruncher [DZ] writing files to /Users/dinomite/Dropbox/sandbox/Number-Cruncher [DZ] dist minted in ./Number-Cruncher |
In the newly created Number-Cruncher directory you’ll find a lib
directory containing Number/Cruncher.pm
and a dist.ini
:
1 2 3 4 5 6 7 8 9 | name = Number-Cruncher author = Drew Stephens [drew@dinomite.net] license = Perl_5 copyright_holder = Drew Stephens copyright_year = 2011 version = 0.001 [@Basic] |
At this point, code and tests are the only things needed to have a Perl module. Here’s some simple code for lib/Number/Cruncher.pm
:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | use strict; use warnings; package Number::Cruncher; =head1 NAME Number::Cruncher - crunch numbers =cut sub new { my $class = shift; my $self = { first => shift, second => shift, }; bless $self, $class; return $self; } sub crunch { my $self = shift; return $self->{first} + $self->{second}; } 1; |
And the associated test file that I created, t/number-cruncher.t
:
1 2 3 4 5 6 7 8 9 10 11 12 | #!/usr/bin/env perl use strict; use warnings; use Test::More tests => 2; BEGIN { use_ok 'Number::Cruncher'; } my $first = 1; my $second = 7; my $cruncher = Number::Cruncher->new($first, $second); ok (($first + $second) == $cruncher->crunch()); |
In three files–dist.ini
, lib/Number/Cruncher.pm
, and t/number-cruncher.t
–we have a module. Run the test with dzil test
and you’ll see Dist::Zilla build your module into a temporary directory and run the test suite from there:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Titus:~/sandbox/Number-Cruncher$ dzil test [DZ] building test distribution under .build/mgJsQhkFi6 [DZ] beginning to build Number-Cruncher [DZ] guessing dist's main_module is lib/Number/Cruncher.pm [DZ] extracting distribution abstract from lib/Number/Cruncher.pm [DZ] writing Number-Cruncher in .build/mgJsQhkFi6 Checking if your kit is complete... Looks good Writing Makefile for Number::Cruncher cp lib/Number/Cruncher.pm blib/lib/Number/Cruncher.pm Manifying blib/man3/Number::Cruncher.3 PERL_DL_NONLAZY=1 /usr/local/Cellar/perl/5.12.3/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/number-cruncher.t .. ok All tests successful. Files=1, Tests=2, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.02 cusr 0.00 csys = 0.05 CPU) Result: PASS [DZ] all's well; removing .build/mgJsQhkFi6 |
To build a distributable tarball, just run dzil build
:
1 2 3 4 5 6 7 8 9 10 11 12 13 | Titus:~/sandbox/Number-Cruncher$ dzil build [DZ] beginning to build Number-Cruncher [DZ] guessing dist's main_module is lib/Number/Cruncher.pm [DZ] extracting distribution abstract from lib/Number/Cruncher.pm [DZ] writing Number-Cruncher in Number-Cruncher-0.001 [DZ] building archive with Archive::Tar::Wrapper [DZ] writing archive to Number-Cruncher-0.001.tar.gz Titus:~/sandbox/Number-Cruncher$ ls Number-Cruncher-0.001* Number-Cruncher-0.001.tar.gz Number-Cruncher-0.001: LICENSE META.yml README lib MANIFEST Makefile.PL dist.ini t |
If you already have a PAUSE account, you can use dzil release
to upload that tarball to PAUSE for inclusion in CPAN. If you haven’t authored a Perl module before, request an account for uploading modules to CPAN. With PAUSE and Dist::Zilla, creating widely-available Perl modules is easy.
See Also
- dzil.org
- Dist::Zilla::Tutorial
- Shell::Verbose, my first Dist::Zilla-powered module