Bicycling, Photography and Programming

commuting

Backups: one quick file backup alias

When you have a file you need to edit and you have the foresight to think, “whoa, make a copy before I destroy…” you often copy hulk.txt to hulk.txt.old (that’s using the minimum of keystrokes:

 cp hul[tab][tab] hul[tab][tab].old[enter].
Linux Backups logo

Linux Backups

Well, a week later, what do you rename your next .old file? .old2? No time to put this folder into revision control? Thought so. You can inspect that last modified time on your file with stat. Experiment with this first:

echo `stat hulk.txt | awk '/Modify:/ {print $2}'`

(*snrk* did I just get you use use Awk? OMG!)

So how does that help…more precisely, you’re asking how do I add that to a backup file name? One of many ways, and I will show you the method with least typing: use an in-place shell exansion.

cp hulk.txt .hulk.txt.`stat hulk.txt | awk '/Modify:/ {print $2}'`

STOP. What wee character did I just sneek into that filename? Hold on, first write it up in an alias so you can reuse it:

alias bu="cp hulk.txt .hulk.txt.\`stat hulk.txt | awk '/Modify:/ {print $2}'\`"

Right, the backslashes (or ‘hacks’ as I nic them) keep your statement from actually evaluating the command as soon as it’s defined. The backtick is the same as saying “bash -e …stuff...”. Anyhow, now type bu and you can backup hulk.txt again. Now type ‘ls’ and see where your backup is.

No file? And no error? Oh, right the period before name hides it (sneeky). This means the next time we accidentally do a “rm *” (which often appears when you say “rm * .old” — Computer, stop, replay with magnification: rm__*__.old ). You need a good-old-fasioned:

ls -a

It’s hiding. Let’s finish up here with your alias, properly written:

alias bu="\`cp $1 .$1.\`stat $1 | awk '/Modify:/ {print $2}'\`"

Can we do it without that crazy awk? Sure:

alias bu="\`cp $1 .$1.\`stat $1 --printf %Y '\`"

Now go make a backup…right now!


Modern Picture Management?

I like to run a thumbnailer across most of my photos so I have little copies to send around, and I mod them so that they look distinctly different from the full resolution source files. I like to use gwenview to flip and rotate them. Gwenview can export to FB and email so that makes things easier.

I copied a bunch of these thumbs to a project folder. However, I still need to use scripting to sets of pictures from different directories, because they match by name. Buckle up:

ls \
| grep small-imgp \
| perl -pe 's/small-(imgp[0-9]+\.jpg)$/$1/' \
| while read F 
do 
   find /home/jreynolds/9/2012/ -iname "$F" -exec cp {} ~/For-Mary \; 
done

Wow, now I can really get to work.


Upcoming: New Standing Workstation

I’ve posted about how my previous endeavors to work at a standing workspace, at work, and at home. It has not gone sour on me yet. Presently at
Candelatech I’ve been sitting on an exercise ball with three landscape monitors. It’s a lot of screen realestate! I love not needing to maximize and minimize windows and the ability to glance at my debug window and at log output at the same time. 

I feel like I slouch a lot more when I’m on the exercise ball–I’m eager to bounce up to the standing work space again. And soon I shall. I have built a wooden monitor rack from lumber reclaimed from a few projects around the house. I have hauled the pieces to work on my bike. It looks like nothing you’ve ever seen before. Expect photos soon.st


Cars Passing Bikes: Do Gutter Bunnies Dress in Wigs?

Interesting news about how drivers act around bicyclists…there seems to be a space about 3 feet away from the curb. Too close to the gutter, and they assume they can pass closer. Also, lack of helmet and having long hair apparently promote further passing distance. Read more at cyclious and streetsblog. Remember — be conspicuous and predictable. Don’t duck between parked cars, cycle in a straight line as if you had a bike lane besides parked cars…otherwise you’re constantly mergine back into a lane of traffic.


The Gray Bike

Three halogen lamps, three batteries. Upgraded to clipless pedals.


Walk + Bike to School Day

Like every day should be, of course.


Bike Shed Ideas?

My office is exploring the possibility of a free standing structure in the parking lot for bike parking. If you’ve been part of such a project, I’d love to hear from you (comment, email or facebook).

This structure would want to hold six bikes, have cable locks, and a structure. Probably both the options for upright and horizontal locking. The structure should not penetrate the tarmac (no concrete bolts or staples), and it will not be touching the existing office structure. It would want to be tall enough to hang upright a cargo bike or a long wheel base recumbent, so that puts a hook as high as 72-74 inches, iirc.

The approval process involves presenting plans to building management and HR, et al. Ideas welcome!


Clear Thoughts on Share the Lane Signs

This concept, and flaws, need to be distinguished in drivers ed, and commonly reminded: A “Share The Road” sign may give the motorist behind the cyclist the wrong message that the motorist can choose to share, or not, since the implication is that the bigger car has bigger rights that supercedes the right of the cyclist.  It may also give the motorist the wrong impression that the LANE can be “Shared” with the bicycle – i.e., that they can co-exist side by side in the same lane.


Kickstand lasted two weeks


Xtracycle Tarp

Details of the tarp I use to cover my Xtracycle snap deck.

corner showing innertube strap and D ring

corner showing innertube strap and D ring

showing 8 straps

showing 8 straps


Road Design has Social Justice Impact

Transportation as a civil rights issue.

Don’t be the one jailed for crossing where there is no crosswalk, either.


Carmageddon: Why cower, bite your nails and stay home?

#carmageddon as a hash-tag seems so strangely appropriate for something as mundane as a freeway closure. It doesn’t deserve any more hype than what Twitter could provide, the subject really exposes society’s relationship to inconvenience — something hardly worth celebrating to begin with.

Carmageddon challenge[slate]

Carmageddon coverage [slate]

I think it’s great to see these transportation challenges. I imagine that if teleportation was an option, TSA would still have such long lines and slow policies, that it would take longer to teleport than to bike places, too.

(@Wolfpackhustle woulda dropped me in the first 0.1 mile, but I’ve been happy to ride that route. Seriously, LA has plenty of non-car commuting opportunity, just ask the locals.)


True Price of Gas (video)

It’s more than $5 or $8 a gallon. Worth a watch: http://centerforinvestigativereporting.org/articles/the-price-of-gas-4865


Finally, a Pneumatic Bike Trailer Hitch!

I LOVE the pneumatic quick release as a mechanism for an axle level trailer hitch…and so does my wife. The dumb-ass vice-hitch that came with the kidarooz trailer was repeatedly failing. So I took inspiration from my BikeRev.com EcoShopper and crafted my own hitch. A pneumatic couple cost me about nine bucks and the 6″ of 3/8″ hose with a pressed fitting was prolly another $7.
On the bike I zip tied a 5″ piece of copper pipe with the male quick release attachment. If the zippies show wear I will upgrade to hose clamp.

Awesome pneumatic quick release

Awesome pneumatic quick release

suck-butt vice can't bite my hitch

suck-butt vice can’t bite my hitch


biking + bottom line

Nice little post describes benefits his company receives from encouraging bike commuting. Love the idea of no-interest bike loan.

http://www.startribune.com/opinion/otherviews/123276188.html


Skype protocol cracked?

Saw this @torrentfreak tweet via @doctrow:

http://torrentfreak.com/skype-reverse-engineered-and-dumped-on-pirate-bay-110603/


Happy Bike to Work and School Day!

Grab your bike and don your lid for this mornings sunny ride! I’ll be volunteering at the Meridian Haggen activity station with Earls Bike Shop. I gotta get rollin!


netbook adventure begins

I just invested in a used Acer Aspire One D250 (not the crashy one) and have just installed Lubuntu using unetbootin. The biggest surprise is how little effort and how few surprises there were.


Viaduct Earthquake Simulation (The SunBreak)

Op-Ed: Shut Down the Viaduct Now | The SunBreak.

I had thought that transforming the Viaduct into a city park would have been a good idea, but this reminds me of the destruction from the Loma Prieta earthquake.

 

Loma Prieta

 


Bike Lanes on Northwest (Bellingham)

This was forwarded from Dan who organized the recent meeting at city hall:


Good day,  here’s a little update on what’s happening around getting bike lanes on Northwest Ave., Elm St. and Dupont St. and three simple things you can do to help make it happen.

The short version of how you can help:

  1. Send an email to the four addresses below.  Let them know you support cycling in Bellingham and want to see the Northwest/Elm/Dupont corridor improved  THIS YEAR.
  2. Spread this email far and wide.  Get as many people as possible to do item 1 at least, and hopefully item 3 as well.
  3. If you can make it, come to the open house that Public Works will host at Shuksan Middle School, Wednesday, March 23, 7-9pm.   Tell someone from PW why you’re there.

That’s it.  So simple.  Please, send one short email to these four addresses.  Let your desires be known to our local policy makers.  We need to impress upon them that there is a large constituency of citizens who want this.  They need to hear the message in big numbers.

Send your message to:     mayorsoffice@cob.orgccmail@cob.orgtcarlson@cob.orgbbaldwin@cob.org
And use the subject line:    Northwest/Elm/Dupont Bike Lanes

The long version (’cause I just love to type):

Bellingham City Council has proposed installing bike lanes on Dupont St., Elm St. and Northwest Ave from downtown to I-5.  This could be one of the biggest bike projects ever in Bellingham.  But it is not a done deal.  You can help make it happen.  Mayor Pike and Public Works would prefer to put the project off until 2012 and expand the scope and cost of it significantly beyond bike lanes.  Details of what else they want to include are not yet available, except that Public Works is seeking $20,000 for the design work alone.  I can only speculate that additions might include bus pull-outs, cross-walks, and bulb-outs at intersections.   Those would be good additions in the long run, but striping bike lanes thissummer does not preclude building these other elements next summer.  And, most importantly, I think, is that there is no guarantee that following this fall’s election we will still have the relatively bike-friendly mayor and council that we do now.  I hope we do, but as they say: elections have consequences.  Putting this off for another year may mean it doesn’t happen at all, especially as the price grows to a politically unpalatable scale in tight times.  A different mayor and council next year may say “Too big, too expensive” and cancel the whole thing.  The bike lanes alone are very inexpensive and easily engineered.  This much can be done this year without limiting what can be added next year.

A few other random talking points:

  1. $4/Gallon.
  2. The only viable cycling route from downtown to Whatcom Community College, Bellis Fair, and Cordata.  Give Northside residents an alternative means to come into town finally.
  3. Some say the climate is changing.
  4. Six schools along this route and childhood obesity.
  5. Good for the local economy (gas money leaves the community immediately, money NOT spent on gas is more likely to stay local).
  6. Good for NW Ave businesses (cyclists are statistically more likely to stop at the businesses they pass than to go out of their way).
  7. It is in the city’s Comprehensive Plan.
  8. Approved by the Birchwood and Columbia Neighborhood Associations

They need to hear the message.  In big numbers.  Send the emails.  Please.  And have a great ride today.   Thanks  -Dan

 


Women’s Domestic Freedom…from Cars

This article by Elly Blue describes a confused world full of sexism, angry drivers and confused cyclists. I often forget about the strong sports and athletic emphasis in the cycling world–mostly because I don’t really pay attention to the sports side of it. Women are still touted as sex objects in the cycling world. Sports seems to cloud the mind, obscuring a greater issue: it is still not safe for women in children to bicycle alongside auto traffic.

It’s hard for people to live without their car if they only feel safe getting around by cars. Do we actually need to drive a car because we assumed everyone was affluent enough to get everywhere by car?  How close is the day when 55% of our income goes into travelling by car? Does that status extend to $10/gallon gasoline?

Will the price of gas out-pace our ability to build separated bike lanes so that citizens can safely cycle without fear of being hit by a 3500lb rain-suit? Are the only cyclists going to be brash, fearless men who would rather chase down cars on their bikes and knock on driver-side windows to tell motorists how they nearly murdered a bicyclist? What does it say of a society that we allow civic infrastructure to remain intractably oligarchical, when a growing number of families can’t afford the gas to use it? Will it force us into vigilante civic infrastructure?

As a father, Elly’s article speaks to me of family life–getting groceries–safely. Civil rights, and the freedom to travel unharmed with your children in public. By walking or biking. I am increasingly convinced that the transportation revolution, like the nutrition revolution, is to be won by women with children voting for safer bicycling infrastructure. We have to pay taxes to get that done. We have to enroll corporations (like grocery stores) into encouraging their customers to get their groceries by walking and bicycling.  This is a domestic freedom. Women need to stand up for their right to not travel by car.


800 Million parking spaces have an environmental impact (ABC News)

Everyone takes parking spaces for granted. What if they were used for something…green? Productive? More shops with MUP trails to them? Article discusses interesting concept about impact of how many parking spaces per car there are.

No Such Thing As Free Parking – ABC News.


Follow

Get every new post delivered to your Inbox.

Join 147 other followers