Git shortcut for moving tracked resources

Software

Yes, I didn't know this until today, much like there's someone born every minute who hasn't seen The Flintstones. Previously to move a file, I would have done this:

$ mv ./original ./new
$ git rm ./original
$ git add ./new
$ git commit -m 'moved original to new'

As an aside, you can also do git rm to remove the file and tracking, or use -f to just do the latter. I'm old fashioned, and prefer my source control just track stuff, rather than manipulating stuff directly. Stuff being the operative word. But I digress.

Not to get all Malcolm Gladwell on you (and stuff), but turns out, there's a mv command instead:

$ git mv ./original ./new
$ git commit -m 'moved original to new'

This way, the files are also associated, and stuff.


John Oliver in Sydney

Media

John Oliver Live

UPDATE: General admission tickets opened, and we got some! Standing only, but we'll take them. Boom!

Yesterday evening, the Sydney Morning Herald ran this:

Desperate fans fork out for tickets

They could have only been talking about John Oliver’s Australia tour. How Clara and I kept refreshing that Ticketmaster page, in vain attempts to secure seats to see The Daily Show and Last Week Tonight star perform in Sydney. We'd even put thought into getting some Jeff the Diseased Lung shirts made to wear on the night.

Alas, despite spending more time and effort into pre–ordering this experience than some throwaway electronic device (that people keep asking me whether I've got or not), the tickets were not to be.

But back to the article.

The A-League grand final is being held at its smallest venue yet. Scalpers are cashing in.

Oh, that’s what it was discussing? Let's pretend it was regarding Mr Oliver. It’ll make coping easier.


git-lite on FreeBSD

Software

I've been moving my svn and hg repos to git, to force personal familiarity with its arcane syntax. Installing the package on a FreeBSD 10.1 box:

# pkg install git

... returns this package list.

New packages to be INSTALLED:
        git: 2.3.7
        expat: 2.1.0_2
        p5-Authen-SASL: 2.16_1
        perl5: 5.18.4_14
        p5-Digest-HMAC: 1.03_1
        p5-Net-SMTP-SSL: 1.02
        p5-IO-Socket-SSL: 2.012
        p5-Mozilla-CA: 20141217
        p5-Net-SSLeay: 1.68
        p5-Socket: 2.019
        p5-IO-Socket-IP: 0.37
        python27: 2.7.9_1
        libffi: 3.2.1
        p5-Error: 0.17023
        curl: 7.42.1
        ca_root_nss: 3.18.1
        cvsps: 2.1_1
The process will require 140 MiB more space.

Holy dependencies, Batman. And here I was thinking git was written in C (and wouldn't be written any other way).

Fortunately, a quick search returned git-lite. In keeping with FreeBSD conventions, the generic named package is compiled with most of the expected includes, with -lite being the minimum required (vim-lite being one other that comes to mind).

So we install...

# pkg install git-lite 

... with the following package list:

New packages to be INSTALLED:
        git-lite: 2.3.7
        expat: 2.1.0_2
        curl: 7.42.1
        ca_root_nss: 3.18.1
The process will require 21 MiB more space.

This has worked so far for work, personal, GitHub and BitBucket over SSH. As my imperial unit utilising friends are wont to say though, your mileage may vary.


Mothers Day 2015

Thoughts

Photo of my mum holding our puppy Tigerlily at the time ♡.

To bring some awesomeness to your day, have this great photo of our mum Debra from my sister @elkeee. To all those who don't have their mums this Mothers Day, love and peace. ♡

During her chemotherapy, Debra had a ton of different wigs. She was a short–haired blond one day, and a long red–head the next. It caused no end of confusion for the security guards in our apartment building in Singapore, something she took great delight in :).

Pictured along with her was our then–brand new puppy Tigerlily. Her brother passed on last year, but Tiger is still getting up to mischief.


The @georgiecel on DuckDuckGo

Internet

This was her tweet in response to my recent DuckDuckGo post:

:D :D :D :D I started using DDG a couple of months ago and am impressed. Bells & whistles and all.

Surprisingly, I also only got two snarky comments. Two! Maybe their caves were too cold today.


Translucent screens

Hardware

I direct your attention to the co–star of last year's surprisingly good 3D movie Expelled from Paradise, voiced by the Queen of Tsundere herself. Specifically, take note of the device she's using:

Angela Balzac from Exiled from Paradise

No, I'm not referring to her gravity defying leotard, or her otherwise traditionally constructed closed headphones (though the material science of both may be fascinating). She's using a music player or a phone equipped with a translucent display.

Whether it's the last episode of Star Trek Voyager, or Minority Report, or Tony Stark's wall mounted screens, futuristic displays necessiate them being translucent. This suggests two things:

  1. Technology has advanced to where translucent screens are possible
  2. Society deems them useful and practical

Point 1 is already partly true. HUDs on aircraft, flexible OLED displays and possibly even projectors allow this. At some point though, they'll be bright and affordable enough to be used everywhere.

Point 2 is more difficult. Just because something is technically possible, should we do it?

When we got high resolution screens with billions of colours, it took over a decade of skeuomorphic designs before we scaled back to simpler (pardon, “flatter”) interfaces. When Netscape implemented the <marquee> element, we had to endure it on sites before good (better?) taste prevailed. I'm sure you could list plenty more examples.

(Yes, I was in primary school at the time, and my first websites were flooded with marquees. We all do crazy things when we're young).

At some point, a translucent screened smartphone will appear. Maybe it will help people watch where they're going! But I'm unconvinced that just because point 1 is true, that point 2 necessarily follows (or that it even should).

Who knows, after a few generations of translucent devices, shipping with a solid background may be a selling point. Then we really would have come full circle.


DuckDuckGo

Internet

Three months ago, I switched to using DuckDuckGo as my primary search engine. So far, I've been quite happy at how well it's worked, and now I couldn't imagine going back to Altavista Lycos Excite LookSmart Northern Light Google.

(Rubenerd's site search, has also been served by DDG for a couple of years).

The web is littered with examples of services that based their existance on not being something else. Ello and ADN weren't Twitter. Diaspora and Google+ weren't Facebook. Few of them had/have stuck, largely because push factors alone aren't sufficient to sway changes in behaviour.

DuckDuckGo is indispensible because of pull factors. Aside from not being Google (increasingly a plus in my book), it has has features Google doesn't have, and I can't live without them now.

Take bang operators. Casey Liss did a great writeup of these, but in a nutshell they allow you to prepend tags to search queries to take you elsewhere. Typing the following will take you to Wikipedia's Bakemonogatari article:

bakemonogatari !w

For when DDG's results aren't enough (increasingly rare), you can even do a secured Google search which won't leak referrer information:

bakemonogatari !g

Answers are also a helpful addition. For example, if you search for regex, you'll get a summary of all the operators. Popular responses from the Stack Exchange network also appear inline, often saving a click.

If you disable JavaScript for security or otherwise, there's also a secure HTML-only alternative that has the advantage of loading much quicker. Remember when every site didn't load JS libraries and fonts that could rival operating systems of yore in size in time to load?

If you're interested, have a go at setting it as your defauly search engine for a few days (instructions for Firefox, Safari, and Chrome). You may be surprised.


sed versus Perl substitution performance

Software

Rubenerd is now generated with Hugo. The performance difference over Jekyll is stunning, though it does take more post-processing to get things the way I want. One task is replacing certain blocks of exported text from each post.

This is the sed command run over all 4000+ posts:

sed -i '' -e 's/something/else/g' ${post}

Note the empty string. BSD userland sed (FreeBSD, OS X, etc) requires this for inline replace. GNU sed in your Linux of choice does not.

Using time, I consistently get these numbers:

real	0m18.889s
user	0m8.388s
sys	0m10.470s

Not the end of the world, but still significant considering Hugo generates the entire site in only roughly double this time. So what could we do to improve this?

It's still my favourite language, so I tried a Perl substitution:

perl -pe "s/something/else/g $POST > ./TEMP

Perhaps unsurprisingly, a dynamic language writing to a temporary file didn't improve things:

real	0m47.647s
user	0m19.730s
sys	0m20.112s

Needless to say, I'm seriously considering learning Go as my next hobby project.


Red Cross Appeal for Nepal

Thoughts

The Red Cross is still taking donations for Nepal. Please donate if you can ♡.

Apple are also taking donations through iTunes.


Australian housing affordability

Thoughts

Play Australian housing affordability news clip from the ABC

This Lateline feature on Australia's housing affordability hit the preverbial nails on the head. The ABC originally aired it on the 23rd of April.

It also gives me a chance to try HTML5’s video element. If you can't see the video, have a direct link and the source page.

Update 2019: I've removed all inline videos from the site; click through to watch.