Words in your face are ruder than smoke

Thoughts

Public smokers are a unique breed. Enough disregard for those around them inhaling their carcinogens, but with the double standards to get precious if you cough loudly.

Today, though, was something special. Reaching for a cup of coffee at this outdoor café, the otherwise beautiful breeze carried a not inconsequential amount of ash, all the way from the inconsiderate people behind me, into my mug. Normally, passive Ruben would have sighed, stopped drinking it and moved on, but I was tired of this bullshit.

Me:

“Excuse me, your ash landed in my coffee. Please be more careful.”

Her:

“Fuck off”

Lesson learned. Smokers can subject people to their foul smelling, lung cell shedding shit in our faces and drinks. Return the favour with words though, and that’s just plain rude. Remember: their right to smoke trumps your right to not feel sick.

There’s a comment about the impossibility of libertarianism ion there somewhere.


Recording screens with ffmpeg

Software

On the Mac, we can record our screens with QuickTime. On other *nix, ffmpeg can be deployed in this fairly straight-forward manner:

% ffmpeg -f x11grab -s 1024x768 -r 30 :0.0 ~/out.mp4

Except in Debian now, we get this:

The ffmpeg program is only provided for script compatibility and will be removed in a future release. It has been deprecated in the Libav project to allow for incompatible command line syntax improvements in its replacement called avconv (see Changelog for details). Please use avconv instead. Requested output format ‘x11grab’ is not a suitable output format

Amongst the politics, I was surprised that ‘x11grab’ was not a suitable output format. I’d been doing it for years. In the schism between ffmpeg and the unfortunately named avconv, had this changed?

Well, first step was to install avconv:

# apt-get install avconv
==> Building dependency tree
==> Reading state information... Done
==> E: Unable to locate package avconv

# apt-get install libav
==> Building dependency tree
==> Reading state information... Done
==> E: Unable to locate package libav

Not having much luck here! Time to do a search.

# apt-cache search libav
==> ffmpeg - Multimedia player, server, encoder and transcoder (transitional package)
==> libav-tools - Multimedia player, server, encoder and transcoder

Yay for Linux naming consistency! Installing that and trying video recording:

# apt-get install libav-tools
$ avconv -f x11grab -s 1024x768 -r 30 :0.0 ~/out.mp4

And now it works! Now then… how do we stop it recording? Last time I did this with ffmpeg, we’d use q. From Ubuntu, this doesn’t work:

Newer versions of ffmpeg don’t use ‘q’ anymore, at least on Ubuntu Oneiric, instead they say to press Ctrl+C to stop them. So with a newer version you can simply use ‘killall -INT’ to send them SIGINT instead of SIGTERM, and they should exit cleanly.

Now we can record and stop recording video. Phew.


The Typo2 iPhone keyboard

Hardware

When I got my first smartphone in 2002, the only people who had them were nerds and business executives. Those of us in school who had them we were routinely mocked for having these ungainly devices. Nice pocket bulge, losers! My how times change.

For those who’s first smartphone was a touchscreen dinner tray, physical keyboards probably seem quaint, even archaic. To be fair, I can type just as fast on my iPhones as I could on the physical keyboards of my Palms. But I still longed for the satisfying feedback of a physical row of buttons I could crunch away on.

So enter the Typo2 Keyboard. I ordered one last week, and have been using it in lieu of the onscreen keyboard since. Let’s run down the list of problems:

  • The keys aren’t Blackberry or Palm calibre.

  • It covers the home button. That means no touch ID, and taking screenshots is more difficult.

  • You can’t swipe up to enable WiFi and such. I’ve somewhat replaced its functionality with Launch.app in my dock, but can still be annoying.

  • If you thought the iPhone 6 was big, you now have something taller.

  • Unlike Mophies, its internal battery has to be charged seperately. It also uses one of this disgusting Mini-USB connectors that makes me appreciate just how lucky Apple people have been not having to deal with them.

  • Oddly, the ALT key is massive, but SHIFT is among the smallest of the buttons.

  • The backlight works almost too well, and can’t be adjusted for dark rooms.

  • If you have a gold or silver 5S, the white front looks weird with the black case.

If I’m in a situation where I know I’ll be typing a lot of text, I’ll snap this on and fly away. For day–to–day use though, I think I’ll stick with the on–screen keyboard.


Quick and dirty Debian wheezy samba share

Annexe

This post originally appeared on the Annexe.

This should only be used for a temporary share on an internal network you trust, and even then it’s sketchy. Does the trick though.

# apt-get install samba
# cat > '/etc/samba/smb.conf' <<BIRDISWORD
[tempshare]
comment = files
read only = yes
locking = yes
path = /somewhere
guest ok = yes
BIRDISWORD

Just building qemu-img on Debian wheezy

Annexe

This post originally appeared on the Annexe.

Dependencies, gleaned from trial and error:

apt-get update
apt-get install autoconf
apt-get install libgliv2.0-dev
apt-get install libtool
apt-get install make

And building from source:

curl -O "http://wiki.qemu-project.org/download/qemu-2.1.2.tar.bz2"
cd ./qemu-2.1.2
./configure --prefix=/usr/local
make qemu-img

Should probably work in Ubuntu too, but YMMV.


UTS Building 11 lifts

Hardware

Far be it from me to critisise the accessibility of the University of Technology’s latest building. Now in an utterly cruel twist of fate, the one part of the structure that could be counted on for predictable navigation has gone belly up, according to a new email:

Please be advised that Lend Lease will commence rectification works to the stainless steel lifts next Tuesday 07/10/2014.

There will be disruption across all the lifts in CB11 until the rectification is completed. Lend Lease will endeavour to progressively stage the works allowing minimal disruption as possible. During this period it is recommended that the stairs and escalators be used where possible.

That is, if one can figure out how to use them. As I wrote in August:

With escalators and stairs of differing lengths interlocking and sending wary, confused travellers different directions with each artistically mismatched floor, its neigh impossible to find anything. Staring up from the ground floor, the initial feeling of quirky fun gives way to the impression of cluttered, unorganised chaos.


Infinite scrolling

Internet

Along with gargantuan, 20pt sized fonts, Georgia for everything, the shebang in URLs, animated splash screen pages and the meatstack icon, the next 2010s design cliché which needs to die is infinite scrolling. Why?

  1. Pages become slower and consume way more memory
  2. Accidentally closed your tab? Good luck finding your place again

Here’s a handy guide for those thinking of using Infinite scrolling, sorted in order of steps required:

  1. Don’t.

For those who’ve implemented it, here’s how to improve it:

  1. Stop.

Missing FreeBSD map file

Software

Today I learned FreeBSD can’t lodge email reports for root if aliases.db was never created, either in bsdinstall or your jail.

Long story short, I was seeing this after sudo-ing into a new instance:

[date] [hostname] sudo: [user]: user NOT in sudoers ; [..]

Heh, my bad. But then this appeared:

SYSERR(root): hash map "Alias0": missing map file /etc/mail/aliases.db
No such file or directory

Huh. So just to try, I “created” the file thusly:

# touch /etc/mail/aliases.db

Needless to say, that didn’t work! The solution, ironically from some ancient Red Hat docs:

# makemap hash /etc/mail/aliases.db < /etc/mail/aliases

This command must be run after creating an /etc/mail/aliases file. You also need to run it if you make any changes.

Happy long weekend!


Xen embargo

Software

I didn’t intend for this to become a security blog. Well okay, I didn’t mean for this to become an exclusively security blog.

In the midst of Shellshock, Amazon announced they’d be rebooting a series of their EC2 instances. The company didn’t comment on why. Over the weekend, Rackspace followed suit. Infrastructure providers around the world proceeded to raise their collective eyebrows. One company doing this is unusual. Two without detail may be cause for concern.

The consensus seems to be (citation needed?) its in response to a Xen hypervisor update. From the XSA-108 advisory:

(Prereleased, but embargoed).

According to the Xen Project security policy page, Amazon and Rackspace are among the companies with pre-release access to this information.

Those are the facts. With some lovely conjecture, we can assume these teams have access to a patch which required a reboot. Both Amazon and Rackspace are known to run very old versions of Xen too, so perhaps this only affects such versions.

We’ll all know more later this week.


Hey, bash doesn’t exist

Software
location: sydney ---

Just as a personal wrapup to bashgate (bashbleed, shellshock?), I uninstalled bash from my FreeBSD boxes. My scripts could all be run with sh anyway, and I hadn’t needed it for anything other than my cloud provider’s context system, but that’s for another post.

In doing so, I made one of my FreeBSD systems so secure, neither Clara or I could even log in! Tailing auth.log:

User X not allowed because shell /bin/bash does not exist
User Y not allowed because shell /bin/bash does not exist

One would be well served running chsh before removing your shell.

In any case, I’m using the system default tcsh again, and swapped it back on my Macs. Heck, I’ve even got it as my default shell on Debian (though isn’t bash on that system just dash anyway?). I can still write tcshrc from memory :).