Previously, I wrote a script that automatically escalated to root permissions if needed.
This works fine for shell scripts, but recently I needed a way to do this for Python scripts. The trouble is that the shebang #! syntax only allows limited command-line argument passing.
This following recipe is not pretty, but it seems to work!
if (( UID != 0 )); then echo re-running as root exec sudo -E "$0" "$@" fi
python2 -u <(cat <<"EOF" print "hello, world!" EOF ) "$@"
As longtime readers of our annual letter have undoubtedly noticed, we try to undertake one big trip each year. This year’s trip came late, just two weeks ago, when we spent eight days in Maui. It was our first real vacation since Dash was born. We all enjoyed the Aloha state, especially Dash who spent hours digging, naked, in the sand; playing in the hotel’s kid pool; and splashing in the ocean surf with Preston. Aimee’s parents accompanied us, allowing us to grab a bite to eat and go snorkeling, kid-free.
Our chief concern for our Hawaii trip was how our high-energy toddler would handle the six-hour plane ride to Hawaii. As it turned out, Dash was a little angel for most of the flight. The source of our trepidation was several mini trips we had made throughout the year, mostly to the coast (a 75-minute drive), Mt. Hood (80 minutes), or Sisters in central Oregon (3 hours). Dash enjoyed the family-friendly day hikes and other activities we did in all these places, but he didn’t care much for the drives, spending hours wailing inconsolably in the back seat of the car.
Dash turned one this year and we have been enjoying many “seconds” with him, including his second summer, his second Halloween (he was a cat), and his second Thanksgiving (he really dug the pie). It’s fun to reflect on how much he has changed in 2012. He went from what we affectionately describe as “our little potato” (rotund and unable to roll over or sit up) to a constantly on-the-go, walking, talking toddler. He can say about 40 words now and especially enjoys imitating any little sound we make. His favorite foods are asparagus, Kalamata olives, dried cranberries, dried figs, and chicken.
Since we didn’t do a lot of travel this year, we enjoyed the many pleasures of Portland, including Saturday mornings at the farmers market, weekend picnics in the park with other families, open house tours (more on that below), and lots of urban walks. Dash also started attending Child Roots day care, where we all enjoy the cloth diapers (which they provide and launder), 100% organic menu (including kale, spelt, quinoa, and French lentils), and “Portland-like” mindset (such as how children are taught to compost their food after meals).
Preston’s name came up on the waiting list this year for one of Intel’s 4’x20’ garden plots. He (with a little help from Aimee and Dash one weekend) planted a wide range of crops, including strawberries, snow peas, cayenne peppers, fennel (which, sadly, never fattened up), and six varieties of Heirloom tomatoes. As you can see on in one of our photos, the tomato plants were quite productive. At the peak, Preston was eating tomatoes for breakfast, lunch, and dinner, and Dash took after him, opening his mouth willingly whenever offered.
The search for a new place to live continues. It’s amazing how small our 1500-square-foot condo feels. But it is not easy finding the right house. The ones with garages never seem to have yards. The ones with yards are on sloped lots (feeding Aimee’s fear that the big earthquake will destroy it). We hope to move in 2013 and to stay in the same neighborhood and school district, both of which we really like.
The newspaper world is still tumultuous. There were no layoffs at The Oregonian this year. But one of The Oregonian’s sister papers, The New Orleans Times-Picayune, began printing only three times a week. It’s sad to think that Portland could become a city without a daily newspaper. In the meantime, Aimee is trying not to think too much about the state of the industry. Rather, she is focusing on doing what she loves. Writing about all the events at the courthouse continues to make for fascinating days!
- Last year's summary, 2011 Year in Review
Hello friends and family!
We hope this letter finds you happy, healthy, and well-rested. We feel very fortunate to say that at least the first two of those have been true for us in 2011. That leads us to the biggest event of our year: Welcoming our son, Dashiell Finn Greenhunt, into the world on May 31 by emergency Caesarean.
We love being parents more than we ever imagined. We feel so lucky to have such a sweet-natured boy who constantly giggles and smiles throughout the day. We even enjoy watching him sleep. With rosy, plump cheeks and long, graceful eyelashes, he looks like such an angel. If you haven’t already, read more about our adventures in parenting at www.greenhunt.posterous.com.
At the end of October, after nearly five months of maternity leave and vacation time, Aimee returned to work four days a week. Preston then took over watching Dash through the end of the year, while continuing to work part-time remotely. Preston has become pretty good at multitasking: Aimee arrived home the other evening to find him sitting on the floor on a conference call, laptop in front and with Dash logging tummy time by his side.
When Preston returns to work full-time in January, Dash will go to day care. We are still in sticker shock over the cost -- $16,000 a year, about what it costs for tuition, room and board at state college!
In other news, Preston is attempting to toilet train our cat, Jill. Yes, we do mean teaching her to relieve herself into the toilet bowl. This involves placing a toilet-bowl-shaped litter tray on the toilet. Once Jill gets used to using the intact litter tray, Preston will slowly remove pieces until she is simply perched on the toilet seat, doing her business. So far Jill appears to be making good progress (after a few accidents). We are such proud kitty parents!
For the second year in a row, Preston bought a season’s ski pass to Mt. Hood. Last winter, he used his pass over 30 times, the most he’s ever skied in a season. Aimee stayed home because skiing while pregnant seemed too risky and she has little patience for 90-minute car trips to the mountain on icy roads.
We’re still enjoying yoga and walking everywhere around our urban neighborhood. The stroller is great for carrying groceries!
For the first time in many years, we didn’t take any big trips this year, storing up our vacation time in preparation for the new baby. Preston did manage a few work trips, to Las Vegas, in January, and to Germany, in March, where he eschewed €400 a night hotels and rented an apartment for a week from a Russian grandmother. In May, he attended his 20-year high school reunion in Atlanta, which was a lot of fun, but did make him feel old!
Thank you to all for the parenting advice, encouragement, and support this year. And for your holiday letters and photos--one of the highlights of our holiday season is decorating our wall with the cards, photos, and letters we receive.
Merry Christmas and a Happy New Year to all!
- Last year's summary, 2010 Year in Review
Read more journal entries.
Sign up to receive e-mail updates from RssFwd whenever new content is available on this site.