May 232016

Not entirely sure how I managed to hose my user directory, but I did, and it followed a boot into safe mode (reboot and SHIFT) in order to update an ancient MacPorts installation; homebrew sort of replaced that for my usage. OK, no biggie. I have back ups right? I do, but those back up in recent months have been based on Apple’s Time Machine. I changed to this from Carbon Copy Cloner by means of experiment. CCC has been bullet-proof, and I have always used it for family members, but there was something enticing about the seeming simplicity of Time Machine… something that is great for restoring files, but not so great, it turns out, for a full system restore. Suffice to say that a combination of backup solutions really is the way to go.

There’s no point in documenting the failures of Time Machine to restore my system “as was”, better to say that from a hosed user directory (specifically something with ~/Applications and ~/Library), and after several attempts to restore:

Boot into guest user account and copy busted ~ dir to an external spinning platter hd.

Get new drive from Amazon of the UK; not the best price, but next day delivery, and that is pretty important right now. The Old Crucial MX100 500 GB drive may or may not be fsked, but It has gone through A LOT of write cycles over the past two years, and I could do with an additional drive in case of future failures anyway, so not pissing about, got the Samsung Evo 850, 500GB, and a few dongles. Very happy with the purchases, actually.


sammy-850-evo and accessories

New, clean OS X 10.11.5 install

Hey… it’s an opportunity to clear out years of crud… old compilers, settings weird dot files all sorts of “system shit” that’s accumulated over the past 12 freaking years, and more than a couple of Macs, and to throw out apps that haven’t been used in Lord knows how long. It’s a bit of a PITA, but I think less so, perhaps, than dealing with all the quirks of years of accumulated cruft.

With the Sammy external, CMD+R boot into recovery mode, and select install new OS on the Sammy. OS X check the validity of the current system on disk and then goes and downloads El Cap. in this case. About 4 hours. Boot from the external drive. Create new admin user, log into iCloud with AppleID, then install:
## Apps
* Dropbox
* 1password
* Firefox
Lord only knows what add ons and such I had installed. I guess these will come back to me on an as-needed basis
¡¡¡ Carbon Copy Cloner !!!
Alfred 2 because this is the way my fingers now work. And somewhat amazingly, and old post of mine proves to be surprisingly useful, and that is sort of the purpose of this blog thingamajig.
* Flycut
* homebrew
brew install git (and zsh, imagemagick, lame, openssl, lua, tokyo-cabinet, urlview, npm)
brew cask install macvim
brew cask install mactex
brew install dnscrypt –with-plugins

Skim PDF Reader

Grand Perspective

bundles and packages to come later
Sublime Text 3
IA Writer

Screenflow 5
Boom 2

add VMs later… win 10, win 95 (yeah, really!), PC-BSD

Maid — a gem — deal with gems later!

## “Files”
* copy over ~/.zshrc, ~/Documents, ~/Music (Launch iTunes… all good), ~/Pictures (launch Photos… all good)
And now a working system that sort of is mine, but is not. Much tweaking remains.

Parallels VMs (Win 98, Win 10, Ubuntu Gnome) — didn’t back these up. Oh well. Never really used them much anyway.

To do:

Source Tree
Newer git tools? The whole git issue is going to be interesting when I get to look at that.
Mathematica 9 — lost the license key?

Fonts — Cousine, Nitti, Yale?, Ancient Greek, Office Code Pro…Computer Modern…??
color profiles
NTFS drivers and shit
Bit torrent Sync ?
Mega ?
Cloud app ?
Google drive?
Rubies and management
Rails, pythons etc.
npm, node js etc
macports? Quite possibly the thing that got me into this mess, but then again this is a fresh install

Fluid app — protonmail, gmail,, keybr

Adobe — EEK!!

Apr 252016
Monty Borle Brook

2016-04-25 Monday

Another walk through Well Meadow, along the eastern bank of the Severn, late this morning. All pretty standard stuff. Monty’s leash walking is getting better. Did come across a male black lab– off leash, of course– who came over to invade his space again. Monts did kick off a little, as the other dog refused to be called back to his owner.

More apologies from the other dog owner. Wondering if Monts feels more constrained/threatened by being on a leash when the others are not? Tricky thing there is, how can I trust him off leash if he does not show complete awesomeness off it? Maybe try a long trailing thing?

More baseball cricket action in the yard late afternoon as I attached some wire stock fencing to the main gate. It was rather an unintentional game, for I had left the Montster in the house, back door shut. And that sort of reminded me that yesterday, on the way back from cricket, I swore that I had closed an internal door. Apparently the dawg opens lever -handled doors.

And he eats green olives. Smart fellow.
First week here:


2016-04-26 Tuesday (wrote Mr. Kipling)

So the fella is still following me around the house, from room to room. Not pushy, and hasn’t gotten in the way yet, even in the darkness of night. He has taken himself into the bedroom a couple of times, but this is never really for very long.

Monts behaved somewhat beautifully when meeting a couple of cats… and he had some free run chasing sticks in a public place. Admittedly there was no one around, and I could see a good distance if anyone were to come into our world, but still. Gotta start the trust somewhere.

Montry free on Well Meadow

Monty free on Well Meadow


2016-04-27 Wednesday

No structured walk today, just fetch-the-ball in the garden.

And early-evening the dog that has too many names [0] just went run about again. Irony of all Ironies when I was adding more stock fence to the gateway out front. So I took to driving around the village all slow and shit looking in people’s gardens, and at kids and dog walkers looking for signs of distress.

Next up on Highley Facebook Page will be “watch out for paedo in blue car!” ☺

I did spot him up by the old telephone exchange, and he did come back and jump in the car when I opened the door and called. That’s good. But still. GRRRR! Assdog has no road sense at all. I don’t mind him going out by himself. He just needs to let me know where’s he’s going, who he will be with, and what time he will be back. Otherwise he is GROUNDED!

[0] Montgomery, Montesquieu, Monty, Monts, Monticello, Montessori, Montreal, the Montster


2016-04-28 Thursday

So he has the idea that balls and sticks are to be fetched and brought back; balls are dropped for a human to re-throw, sticks are for holding on to, and playing tug. Dropping something on command is not something that he is used to, but I’m sure we can use his doing so with a ball to advantage there. No concept of “leave it” either. I go to pick up a non-ball, and he’s on it. Again using the ball knowledge as a base, I think there is something definite there from which to work.

Lots of anal licking… some anti-worm medicine ordered.


2016-04-29 Friday

Met a couple of doggies off leash down by the Donkey Bridge, and all went where there. Encountered the same dogs on another loop, and again no issue. No hackles at all second time around as Montster was sort on involved in trying to understand “drop” (stick), “leave it”, and “pick up”. This with one of the dogs– some kind of rough haired terrier– somewhat in his face.

Monts walking again excellently at heel, coming back when called (but not yet tested under stress), and fetching stick on a trailing lead. All good stuff!

Walk through Bridgnorth High Street…. no probs with other dogs, yelling kids out of school, and people eating pasties and chips and shit. Bit of shopping in TFM, and again sitting nicely. Stopping and sitting at road crossings, all good.


2016-05-30/31 Saturday/Sunday

Brook walks, but for the most part just hangin’ in the garden cutting grass and getting fence posts in place. Lots of fetch and recall. Being cautious and locking the back door when I am not paying attention to him– since he can open the door. Git! Grabbed a 1/2Kg of cheddar off the counter on Sunday. Grrr. Cheese banditry will not be tolerated 🙂

Apr 242016

IA Writer to WordPress

0. Wha?

With the coming of the new doggie into the house, perhaps I will again add more content to the bloggy thing that I have kinda sorta not really been keeping over the last little while.

Probably this has been done by someone else on the Intertubz, but ach, why not. I have some time on my hands, so here are running notes in IA Writer that will make its way to a WordPress post by some means or other. There’s nothing special about IA writer, by the way. Well, there is, but not for the purposes of the WordPress posting. The same code should work with any plain-ish text file coming from any editor.

Why bother? Well, I think that the primary reason a lot of my notes have not made it to the blog is that it is just such a PITA to go out of my way to make a blog posting. If it all just sorta “works” from my usual workflows than that would perhaps be a very different situation. Not that I think I have anything particularly interesting or unique to say

1. This file

Is written in markdown, with metadata at the head:

Title: IA Writer to Wordpress  
Author: yearlus  
Email: [email protected]  
Date: 2016-04-26  
Format: complete  
post_status: draft  
post_date: 2016-04-26
post_title: IA Writer to Wordpress  
category: tech  
post_tag: text, editors, Ruby, code, Wordpress, workflow  

# [%Title]

2. Markdown processors

Four Ruby processors for playing with markdown are briefly alluded to here: markdown-processing-ruby

And I went ahead and played with two of these:


$ gem install redcarpet -n /usr/local/bin


$ gem install kramdown -n /usr/local/bin

But neither of these processors support (yet!) the metadata blocks of MultiMarkdown. And kramdown does not recognise the back-tick code-fence (“` “`), only the tilda code-fence (~~~ ~~~)

So, install Fletcher Penney’s MultiMarkdown, and test:

$ brew install multimarkdown
$ multimarkdown ~/_scratch/IA-Writer-to-WP-Coleman-Notes.txt > ~/_scratch/IA-Writer-to-WP-Coleman-Notes.html

Gives some very nice HTML, including interpolation of the metadata (of this file), and writing of that metadata:

    <meta charset="utf-8"/>
    <title>IA Writer to Wordpress</title>
    <meta name="author" content="yearlus"/>
    <meta name="email" content="[email protected]"/>
    <meta name="date" content="2016-04-26"/>
    <meta name="format" content="complete"/>
    <meta name="post_status" content="draft"/>
    <meta name="post_date" content="2016-04-26"/>
    <meta name="post_title" content="IA Writer to Wordpress"/>
    <meta name="category" content="tech"/>
    <meta name="post_tag" content="text, editors, Ruby, code, Wordpress, workflow"/>

So the process for this exercise seems clear:
1. “~~shell out” to markdown and produce an html file~~
2. process that html with nokogiri
3. post to WordPress

No need to shell out, apparently. tillsc has already built a Ruby extension library around MultiMarkdown, Ruby MultiMarkdown 4, so
I guess the awkward bit would be how best to execute the ruby script that pulls all this together… from a services menu item, maybe? And then how to deal with edits… something in the metadata at the head of the file? A call to getPost call to XML RPC to see if an existing post “matching” (on what criterion?) that about to be posted exists? But what to check on? Is the old post deleted? I suppose when one starts thinking about these things then one might just as well produce an actual interface to WordPress, but why bother when there are so many such things anyway?

Maybe I will look into that… but I am reasonably happy with the fact that this post came from iA Writer, and without too much trouble either. Next up? A horror-show of a MultiMarkdown file in iA Writer to to see how much gets translated into a decent-ish looking post.

3. Code

Posting to WordPress is pretty straightforward. All the heavy lifting is done by the rubypress gem, which makes this sort of thing doggone simple (see what I did there!). Here a block of code from that thing I wrote a while ago that scraped a Koine Greek “Word of the Day” from Ἡ Καινὴ Διαθήκη. Last post here

# ========== Post to Wordpress ==========
if options[:wordpress_write] == 'yes'
  wp =
    host:      "#{config['wp']['host']}",
    username:  "#{config['wp']['username']}",
    password:  "#{config['wp']['password']}",
    path:      "#{config['wp']['path']}")

    blog_id:    '0',
    content:    {
      post_status:   'draft',
      post_title:    "#{html_title}",
      terms_names:  {
        post_tag:     ['greek', 'koine', 'κοινή', 'language'],
        category:     ['Greek']
      post_content:  "#{wp_content}"
# ========== END WP Post ==========


posted with wpiawriter v. 0.1
Apr 232016
Monty Hilbrae Paddock

2016-04-17 Sunday

(Week two here:

Rescue Dog event in Shrewsbury…. thought it was at Grinshall Animal Rescue, but they were only sponsors, and the event itself was at the Quary in in town. Rather too late in the day to head to that, so went to Hilbrae Pets Hotel, about 10 mins away. Spent about 30 mins walking “Monty”:


Inmate # A1850
Incarcerated: 2016-03-07
Microchip ID: 958000001334904
B&W Collie Cross– with what? Shepard? Lab? Staffie?
Not castrated
Defo not a working dog– does not have the eyes
Gun shy
Advised that he was last with a farmer, and Monty took to roaming when not supervised
Good with older kids and adults. Good with dogs. Likes to chase cats and birds. Nothing erratic and unpredictable in other words
Walked well on lead. Very interested in field mice, lots of sniffing and marking… prolly because not neutered.

So, I “Reserved” Monty… Animal control person to come by mid-week to check on fencing and such.


2016-04-19 Tuesday

Walked with the Montster, played in the paddock, fetching stick. Came when called. Likes to play tug, not very good at letting go of a throw toy. Completely ignored donkeys in paddock next door, and farmers ploughing.

Stool very runny. Apparently he eats only once in the AM…. mixture of wet cans and kibble… whatever Hilbrae get from donations, really.

Think I may have trodden on his toe at one point– let out a bit of a yelp.

Seems a little nervous.

Sat with Monty on bench watching other dogs come and go. No bother. Joked with worker that I’d take him home today if I could. That actually happened. £85 adpotion fee.

Some confusion about vaccinations– 2016-01-18 by Shropshire Vets (+44 1743 860 920) on  the farm. Does he do so many that he cannot issue certifications? How is not issuing a certification not illegal? Surely vet was paid, so where is the invoice?

No problems with him jumping in the hatchback, though he did come over to the back seat and was very interested in being in the front. Drove slowly. Very slowly.

Late in the day, and knowing of fence gaps at home, kept him on leash. Short loop Vicarage Lane and up through the village.

Day bed in living room. No couch. Slept next to me in bedroom, on floor on old duvet.

Tug toy purchased from Whitburn street pet shop; and lamb and rice kibble by James Wellbeloved. Available on Amazon, isn’t everything?


2016-04-20 Wednesday

Early morning walk to the Costcutter. Met dog walkers on the way all good.
Slightly longer loop down Vicarage Lane and up through the village. More livestock. All good.

TFM to get some fencing wire. Better in the car. Less tendency to move to the front where all the action is. Took him out to see the wire… tried to mark territory. Dude who picked up wire and placed it in car was biggish, hi viz. Patted Monts. No bother. Ate some Tyrell’s crisps.

Walk by the river in B’north after an appointment. BC had a bark at him. No response. Still lots of sniffing and marking. No interest in ducks and geese. Sat at the back of the Fosters Arms… little boy shouting “Look. Doggie.” No issues. Feeling good about this pooch.

Stools much firmer.

Found Sammy’s old football. Played tug in the house. Football destroyed. Noticed that Mont’s lower canines are somewhat worn.


2016-04-21 Thursday

Happy birthday, Lizzie.

Front gate damaged, bent. Put back into rough shape w/ blow torch and sledgehammer. Monts maybe a little freaked because when I called him next he was gone. See Facebook for more details. Apparently he “attacked” another dog. Possible. I do not know for sure.

Woman brought him back. Stuck her face in his and he was not bothered. I was on edge though.

Rest of the day spent with him off-lead in the garden. Seemed to have no interest in the >>cough<< 22 m missing section of hedge. Solar Panel Dude came by… bit of a bark, but came to see us in the shed when SPD gave his presentation. Sniffed, then went outside.

Bark at the postie. Perhaps he is recognising this place as his, wants to protect it? Neither  person seemed threatened.

Had twenty minutes cycles of play and my cutting grass. Seemed a little freaked at the staring of various small engines, but was fine once they were running. No chasing of lawnmower.

Went for a pint in the Bache. Free run outside. Delivered glass to counter, Monts came though. No interest in the people inside.


2016-04-22 Friday

I feel like shit for some reason. Very slow day. Morning getting some JSA shit done, Mont’s merely had a couple of pee ‘n’  poos up the yard.

Afternoon up to Bridgnorth and a walk along the river.

Springer comes bounding across an invades our little game of shake hands. Monty slips and there is a bit of a scuffle. Do not know why… the surprise? Does he want to protect me? Does he feel that I  cannot protect him? NO punishment. Who knows if that was the right thing to do. Thought it best just to ignore it and remain calm. Did scramble like a mad bastard when it happened.

Springer owners very apologetic. Mont’s space was defo violated…. but still he should not have had that response. Equally, I should be more aware and head these things off before they happen. I AM taller and can see father! My nose is not as awesome though!

Does he not like the dry kibble? Seems not to be eating that much… bought some Tesco “Chunks in Jelly


2016-04-23 Saturday

Came out to greet delivery guy at the gate (fencing tools– yay)… Monts had a bark, hackles slightly raised. Protecting his property?

About Mid-day went down toward Brook’s mouth, practised closer leash walking and “here” to get him to come back and reset before we set off again. I guess if he associates a slack lead with walking, and tight lead with stopping he will soon get the message. Should be careful with over-praise/treats when he does come back to “reset”, lest he associate this fuss with tight lead.

And then off to the Brook… first introduction to water. Does not look like he’s a swimmer, but he did venture in, digging rocks out of the bed, and fetching sticks in shallow water.

Met no people or other animals. Drove to get us to the two spots. Seems to be getting better and not rushing out of the car. “wait” is not perfect, but it is pretty good.

Went out for about 1/2 hour without him. Just left. No fuss. VERY excited when I got back. Ignored him until I was ready… stuff put away, shoes off, etc. then a simple scratch on the head. My coming and going should not be a big deal deal to him. He’s already pretty nervous. Need to build the fellow’s confidence! Tomorrow will be interesting since I am out pretty much most of the day playing cricket.

Fir the first time he went and put himself to bed… thus leaving the room I was occupying. That’s a good sign.


2016-04-24 Sunday

Spent about an hour and a half on the Alveley side (mostly) of the Severn Valley Country Park. No drama to be had at all on the meeting with doggies… all of whom were off leash. Montgomery Montesquieu, AKA The Montster, AKA Monty was, of course, on-lead.
* first off: black lab getting out of car on Highley side. Monts by out car. No fuss
* Rescue BC from Birch Hill Dog Rescue, Cleobury, female, 7 years. Very nervous she was, tail tucked between legs. She stood some way off not looking at any of us. Monty’s hackles slightly raised.  Had him sitting next to me as I shatted with the guy. No sign of Monts be furhter interested in the bitch. Got noticeable calmer with my chatting.
18 mo. German Shepard bitch, “Shadow” off-leash by the river. Again distracted Monts with liver, other dog was insistent on coming over. They smelt each other. I felt nervous. Monts hacked raised. No outward signs of aggression, wanting to lunge etc. He just seemed wary, and “stand-off-ish”.
* Three Lurchers/Greyhounds mid-bridge. Plenty of time to see them coming. Did some “stop”, “heel”, “sit”, “wait” basic obedience stuff to distract Monts at bridge end. They came and crowded him. Hackles slightly raised, but he was receptive to some more “sit” and “here”. Again nothing happened but smells all around, but you can see he is nervy. Getting the impression he has been attacked in the past.

Some good loose leash work. Still a very heavy sniffer… that ain’t going away. But I figure if I associate his sniffing with “go sniff”, than I can convince him then it is more OK some times than others. He’s slowly getting the message that tight lead either means I do not walk, or I turn abruptly around. Also getting more attention from him when just walking loose-leash.

Stopping and waiting at gates and styles, top and bottom of steps/stairs for me to go first, and then only to move on a “let’s go”. Is pretty damned good.

After cricket… came back some 7 hours later to an effusive welcome which I ignored untl he was calm, then just patted him. PnP up the yard then smacked an old baseball around with him for a bit. That was a hit! Gonna have to teach the fella not to chase red balls, however! Nothing chewed up or urinated on… so more signs that is following me around is not a precursor to separation anxiety.

Week two here:

Sep 152015

My mother seems to have had rather a lot of damsons on her tree this year. This heavy cropping combined with heavy rain over the last few days has lead to some immediate load-reduction on the broken limb. Fsck the impecunious nature of the (lack of?) pruning over recent years.

2015 broken damson limb

I think some kind of everything-damson is in order. But let’s start with a pie. Now, I cannot bake for toffee so this should be fun…

The process is play-as-you go. The measurements below are play as I went, and are accurate.

I’m gluten intolerant (yeah, yeah… whatever), so I’m using Dove’s GF self-raising flour.

Pastry Ingredients:

100g butter (unsalted)
300g Dove’s self-raising
75g light brown sugar
3 large egg yolks

Right. I half remember beating sugar and butter as the basis for pretty much everything that is (non-bread related) baking from home economics class. Yes, I am that old. So beat the sugar and the butter until creamy, then add the egg yolks. Delicious. Then add the sifted flour.

Dice! Dough. What sort, I do not know.


Roll out with used wine bottle, and lay over tin/aluminium/kitchen foil, add another layer of foil on top then some bean-like things and bake for 10 minutes at 220 ºC. “It’s not smooth,” you say? “Bollox!” I say. “I’m new. It’s my first day.”

damson-custard-pie (1)

The jam-like bit:

Take damsons from tree. Rinse etc. Add some unkonwn apple specie from apple tree to the damson’s tree’s southern side— the sour-ish one where the tree swing is hanging. No idea how much of each… just mixed and simmered with brown sugar and a little water until it tasted good, and was reduced to jam. I added some xantham gum to thicken because time was running short. Oh, and some fresh vanilla pod scraping tat I’d soaked in water, but I realise that this was a pretty sill place to put it. It should have been in the custard topping.

damson-custard-pie (2)

The spread your jam on your blind-baked pie base. Simples. Meanwhile make custard.


I was out of cream, so I took:

60g of clotted cream, and
300 ml of full-fat milk, and

heated both in the microwave,  gave it a good beating then added to 3 more eggs yolks and 1 egg (and some more vanilla) and took that to the stove to make custard.

The custard, of course, goes over the top of the jam once it is done. It is sprinkled with more sugar, and the whole thing is baked again for 20 mins at whatever temp. I mentioned above.



the pie...

Post scriptum:

Sweet base. Sweet jam. Not enough custard to balance the thing.
Too much sugar.

But it is damned tasty. And it is “honest” and homemade.

Aug 102015

From Randall Jones & Erwin Tschirner’s A Frequency Dictionary of German: Core Vocabulary for Learners.

1. sein to be
2. haben to have
3. werden to become
4. können can, to be able to
5. müssen must, to have to
6. sagen to say
7. machen to do, make
8. geben to give
9. kommen to come
10. sollen should, ought to

11. wollen to want
12. gehen to go
13. wissen to know
14. sehen to see
15. lassen to let, allow, have done
16. stehen to stand
17. finden to find
18. bleiben to stay, remain
19. liegen to lie, be lying
20. heißen to be called

21. denken to think
22. nehmen to take
23. tun to do
24. dürfen may, to be allowed
25. glauben to believe
26. halten to stop, hold
27. nennen to name, to call (a name)
28. mögen to like
29. zeigen to show
30. führen to lead

31. sprechen to speak
32. bringen to bring, take
33. leben to live
34. fahren to drive, ride, go
35. meinen to think, have an opinion
36. fragen to ask
37. kennen to know
38. gelten to be valid
39. stellen to place, set
40. spielen to play

41. arbeiten to work
42. brauchen to need
43. folgen to follow
44. lernen to learn
45. bestehen to exist, insist, pass (an exam)
46. verstehen to understand
47. setzen to set, put, place
48. bekommen to get, receive
49. beginnen to begin
50. erzählen to narrate, tell

51. versuchen to try, attempt
52. schreiben to write
53. laufen, to run
54. erklären to explain
55. entsprechen to correspond
56. sitzen to sit
57. ziehen to pull, move
58. scheinen to shine, seem, appear
59. fallen to fall
60. gehören to belong

61. entstehen to originate, develop
62. erhalten to receive
63. treffen to meet
64. suchen to search, look for
65. legen to lay, put
66. vor·stellen to introduce, imagine
67. handeln to deal, trade
68. erreichen to achieve, reach
69. tragen to carry, wear
70. schaffen to manage, create

71. lesen to read
72. verlieren to lose
73. dar·stellen to depict, portray
74. erkennen to recognize, admit
75. entwickeln to develop
76. reden to talk
77. aus·sehen to appear, look (a certain way)
78. erscheinen to appear
79. bilden to form, educate
80. an·fangen to begin

81. erwarten to expect
82. wohnen to live
83. betreffen to affect, concern
84. warten to wait
85. vergehen to elapse; to decay
86. helfen to help
87. gewinnen to win
88. schließen to close
89. fühlen to feel
90. bieten to offer

91. interessierento interest
92. erinnern to remember
93. ergeben to result in
94. an·bieten to offer
95. studieren to study
96. verbinden to connect, link
97. an·sehen to look at, watch
98. fehlen to lack, be missing, be absent
99. bedeuten to mean
100. vergleichen to compare

Jul 282015
$ gpg --keyserver hkp:// --send-keys A3E66077 && gpg --keyserver hkp:// --send-keys A3E66077

$  gpg --armor --export A3E66077
Comment: GPGTools -

Jul 272015

Assuming one has homebrew installed:

$ brew update && brew upgrade
$ brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools
$ cd ~/dropbox
$ for video in *.MOV; do ffmpeg -i "$video" -vcodec h264 -acodec aac -strict -2 "${video%.*}.mp4" ; done
$ rm *.MOV
Jul 272015

Like this fellow, Steve Losh — better shifting, I’ve been using the wrong shift keys for upper-case letters for as long as I’ve been using a keyboard… as well as some even more egregious errors (right ring finger for ‘p’, right index for ‘b’… the list is nigh endless). Lo, his Karabiner solution:

Arghh!….. It has only been a couple of hours and this is devilishly frustrating!!

    <name>Use the correct shift keys.</name>

    <autogen>--KeyToKey-- KeyCode::Q, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::W, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::E, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::R, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::T, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::A, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::S, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::D, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::F, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::G, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::Z, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::X, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::C, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::V, ModifierFlag::SHIFT_L, KeyCode::VK_NONE</autogen>

    <autogen>--KeyToKey-- KeyCode::Y, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::U, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::I, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::O, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::P, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::H, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::J, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::K, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::L, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::SEMICOLON, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::N, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::M, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::COMMA, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::DOT,   ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
    <autogen>--KeyToKey-- KeyCode::QUOTE, ModifierFlag::SHIFT_R, KeyCode::VK_NONE</autogen>
Jul 232015

Apparently low-level keybindings in OS X used to be managed through


which did not exist on this 10.10.4 system. So after having created it and added

/* Context Menu */
"\U0x3fc" = "rightMouseDown:"; /* Fun-C */
"^;" = "rightMouseDown:"; /* Ctrl-; */

/* Vim movement while Ctrl key down */
"^h" = ("moveLeft:");
"^j" = ("moveDown:");
"^k" = ("moveUp:");
"^l" = ("moveRight:");


it did, of course, not work.

Googling around a bit, I found Karabiner (a powerful and stable keyboard customizer for OS X), and this seems to be able to do the trick perfectly. So, editing ~/Library/Application Support/Karabiner/private.xml to include:

<?xml version="1.0"?>
            <name>VIM HJKL</name>
                KeyCode::H, ModifierFlag::FN,
                KeyCode::J, ModifierFlag::FN,
                KeyCode::K, ModifierFlag::FN,
                KeyCode::L, ModifierFlag::FN,
        <name>kybd control click</name>
            KeyCode::C, ModifierFlag::FN,

I have two very simple sets of keybindings available to me under Karibiner. Fn+H thru L gives me VIM movement _in any app_, and Fn+c gives me access to contextual menus without the effort of right/control clicking and visual item in OS X.

Karabiner key code data is at

OS X keycodes can be gotten from events.h,, thus:

$ grep '^ *kVK' /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h|tr -d ,|while read x y z;do printf '%d %s %s\n' $z $z ${x#kVK_};done|sort -n

lists them all:

Lovely jubly!

Social Widgets powered by