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.
LKRhash is a hashtable that scales to multiple processors and to millions of items.
LKRhash was invented at Microsoft in 1997
by Per-Åke (Paul) Larson of Microsoft Research
and Murali Krishnan and George Reilly of Internet Information Services.
LKRhash has been used in many Microsoft products.
The techniques that give LKRhash its performance
include linear hashing, cache-friendly data structures, and fine-grained locking.
If Microsoft had had 20% time,
LKRhash would have been my main 20% project.
I put a lot of effort into making …continue.
Title: Watch Your Back!
Author: Donald E. Westlake
Rating: ★ ★ ★ ★
Publisher: Warner
Copyright: 2005
Pages: 345
Keywords: crime, humor
Reading period: 9 January, 2017
Watch Your Back! is one of the last Dortmunder novels,
Westlake’s comic series about an unlucky crook
published between 1970 and 2008.
Dortmunder and his crew have a sweet lead on an unoccupied penthouse apartment,
but their usual planning space, the O.J. Bar & Grill,
has been turned into a bust-out joint by the Jersey mob.
So now they have two jobs to pull:
rob the obnoxious rich guy’s art and save the O.J.
Of course, complications arise
because nothing ever goes to plan in a Dortmunder book.
Enjoyable.
Last weekend, I restored a number of posts that had appeared
on the earlier dasBlog incarnation of this blog,
but had never made it to the Acrylamid version.
I added about another 50 posts this weekend,
taken from the Wayback Machine.
I think that this is all the posts that are missing.
That required further fixup.
I had to turn the HTML back into reStructuredText, which I did by hand.
Some useful tips will follow in future posts.
Title: Dr. Strange
Director: Scott Derrickson
Rating: ★ ★ ★ ½
Released: 2016
Keywords: Marvel, fantasy
Watched: 7 January, 2017
Stephen Strange is a world-class surgeon whose talent is only matched by his arrogance.
His hands are ruined by a car crash, leaving him desperate to regain their use.
In Nepal, he finds a temple of sorcerers led by the Ancient One,
where he learns new and unsuspected ways of dealing with the world.
Eventually he takes on the renegade sorcerer Kaecilius,
who wants to summon Dormammu from the Dark Dimension to change the world.
Aside from his very odd American accent,
Benedict Cumberbatch does a decent job with a not-great script
of portraying one …continue.
Ever had a Git repository where there’s an overwhelming number of branches,
most of which are surely abandoned?
You run git branch --remote and you see dozens of unfamiliar branches.
Where to begin?
- Use git for-each-ref –sort to sort the branches
so that you can identify the oldest branches.
- Use git branch –remote –merged master
to detect which branches have already been merged into master.
It’s likely that these are branches that weren’t deleted
after a pull request was merged;
it’s usually safe to delete these.
- --no-merged shows unmerged branches;
these require further investigation.
Here’s an example for flyingcloud:
$ git for-each-ref --sort=-committerdate \
--format='%(committerdate:short) %(refname)' refs/heads refs/remotes
2016-12-29 refs/remotes/origin/master
2016-12-29 refs/remotes/origin/HEAD
2016-12-29 refs/heads/master
2016-12-11 refs/remotes/origin/0.1.x
2016-06-09 refs/remotes/origin/fix/salt-pip-version-problem-in-demo
2016-05-25 refs/remotes/origin/updates
2016-05-09 refs/remotes/origin/feature/documentation-improvements-3
2016-04-19 …continue.
Previous »
« Next