Twenty-eight years ago today,
I attended George H.W Bush’s inauguration.
By accident. Read that post for the rest of the story.
I didn’t especially care for Bush Senior.
I certainly didn’t care for George W. Bush,
who was the worst U.S. president in my memory.
We’ve just had one of the best.
Obama was a president of high personal character and competence.
His administration had integrity and remained free of scandals.
He inherited an enormous economic mess and cleaned it up.
He introduced the Affordable Care Act,
something no other Democratic president managed.
He faced wholly unprecedented opposition and intransigence from the Republicans,
who vowed early on to make him a one-term president.
In mid-2011, two young …continue.
C-like languages have a ternary operator,
cond ? true_result : false_result.
Python has true_result if cond else false_result.
Bash doesn’t have a ternary operator, but there are various workarounds.
I wanted to print succeeded or failed
based on the exit code of the previous command
in a shell script.
In Unix, all programs exit with an integer status code.
Successful programs exit with 0;
all other values, positive or negative, indicate failure.
In Bash, the status code of the previous program is held in $?.
some/command or-other fer example
STATUS="$([ "$?" == 0 ] && echo 'succeeded' || echo 'failed')"
echo "Results: $STATUS"
There are other ways to handle this.
I’ve worn a beard since 1986, when I was 21.
Only rarely have I been cleanshaven since then.
Emma, who met me in 1997,
has only seen me cleanshaven once before,
about 15 years ago.
I promptly regrew the beard that time.
I decided in October to fundraise for Movember.
In truth, I was also curious to see
what I looked like without my trademark beard.
On Halloween night, I shaved everything off.
Interim photos as I whittled down the beard
can be seen below,
as can some progress photos taken since then
as I grew an over-the-top handlebar mustache.
I’ve let the rest of the beard start growing in
after my heel operation a week and …continue.
I had heel surgery last week
to remove a heel spur which was causing tendonitis
and to repair the Achilles tendon.
More on that some other time.
I rented a knee walker this morning from Eastside Leg Up.
I love it!
After barely getting around with crutches for a week,
the scooter makes a huge difference.
I can move around at normal walking pace now,
instead of wearing myself out with the crutches.
Incidentally, I found my first WebP image in the wild:
the original of the image that’s shown here.
I used ImageMagick convert to make it into a JPEG.
Title: The Atrocity Archives
Author: Charles Stross
Rating: ★ ★ ★ ★
Publisher: Ace
Copyright: 2004
Pages: 345
Keywords: Lovecraftian spy thriller
Reading period: 10–12 January, 2017
Bob Howard, Laundry hacker newly promoted to field agent,
finds himself protecting a logic professor from rogue SS-Ahnenerbe agents
who’ve been hiding in another dimension since the end of the War.
But their biggest problem is the frost giant that was summoned.
And later there’s the subverted CCTV cameras with the basilisk stare.
To borrow Charlie Stross’s own words from his Crib Sheet:
So there you’ve got the ingredients.
Lovecraftian horror;
the secret agency [the Laundry] dedicated to protecting us from the scum of the …continue.
Ever wonder what the six-digit file modes are in a Git commit?
The mysterious 100644 and 100755 modes?
diff --git a/foo/bar.py b/foo/bar.py
old mode 100644
new mode 100755
index b829edea4..ee6bda024
--- a/foo/bar.py
+++ b/foo/bar.py
@@ -1,3 +1,4 @@
...
I had made foo/bar.py executable by using chmod +x
and adding a #!/usr/bin/env python shebang.
The last three digits are obviously the same octal digits that you can use with chmod.
But what’s that 100 prefix?
The explanation can be found in a StackOverflow answer:
100644₈ regular file (non-executable) S_IFREG | S_IRUSR | S_IWUSR
…continue.
Title: Boiling Point
Author: Frank Lean
Rating: ★ ★ ★ ½
Publisher: Arrow
Copyright: 2000
Pages: 432
Keywords: crime, UK
Reading period: 2–5 January, 2017
Dave Cunane is Manchester’s mouthiest PI.
He gets tangled up with the wild daughter-in-law of the crooked Carlyle family.
Marti wants him to prove the innocence of her father who’s doing life for killing a cop.
She doesn’t go over well with Dave’s own half-crazy girlfriend.
Neither the Carlyles nor Dave’s ex-police father want Vince King freed.
It’s not going to end well.
I’ve been using Jenkins lately,
setting up Pipeline builds.
I have mixed feelings about that,
but I’m quite liking Groovy.
Here’s an example of a Closure called acceptance_integration_tests,
where the release_level parameter is a String
which must be either "dev" or "prod".
def acceptance_integration_tests = { String release_level ->
assert release_level =~ /^(dev|prod)$/
String arg = "--${release_level}"
def branches = [
"${release_level}_acceptance_tests": {
run_tests("ci_acceptance_test", arg, '**/*nosetests.xml')
},
…continue.
Title: Death of a Red Heroine
Author: Qiu Xiaolong
Rating: ★ ★ ★ ★ ½
Publisher: Soho Crime
Copyright: 2003
Pages: 464
Keywords: crime, China
Reading period: 27 December, 2016–6 January, 2017
Chen Cao is an unlikely new Chief Inspector in the Shanghai Police in 1990,
as he’s a poet, a scholar of T.S. Eliot, and a translator of English detective novels.
In Death of a Red Heroine, a national model worker has been found murdered in a canal.
The death is politically sensitive
and Chen’s investigation leads him towards the son of a high-ranking cadre,
which makes his position even more tenuous.
Qiu is as much concerned with the changes then happening in …continue.
I wanted to diff two files.
One of them needed some seds on each line and sorting.
I wanted to do that on the fly,
without leaving a massaged intermediate file lying around.
colordiff --unified <(cat orphaned_permalinks.txt
| sed 's@http://www.georgevreilly.com/@@'
| sed 's/.aspx$/.html/'
…continue.
Previous »
« Next