Monday, 19 September 2016

Leak this: A Concerned Member of the Rest of the World

Subject: Hello? Hello? Is there anybody in there?

Ok. We've watched the show.
Geting tired.
And worried.
Due to a slight issue with your constitution and electoral college system, you seem to have a problem.
The rest of the world.
It seems like you've missed the point.
We have universal health care and... Oh we don't need to go on. It's all there.
In policies similar to, but not far enough, Bernie.
We have to ask:

What The Fork Are You Doing?
You have to choose between two megalomaniacs?
One will get to the oval office and spin the chair around whooping "I did it! WooHoo!".
And the other will ask where the cameras and lights are for the upcoming series:
- Apprentice: Dept of Justice
- Apprentice: Supreme court

Time to grow up.
Please stop this.
It's just silly.
Stop it.

Sunday, 18 September 2016


And speaking of birthdays...
Had my 60th recently.
And received a news letter from my local MP.
Here's a photo:

I threw a tantrum and hurled it across the room.
An admittedly restrained tantrum as I had to maneuver my walker and take my medication.
Ben, being sane and unwilling to face my ungodly wrath, left it where it was.
That was some days ago now.
It's been sitting there like a malevolent pixie jeering at me from the corner.
"I AM NOT A SENIOR!" I mutter under my breath...
I picked it up and it will be going on the BBQ tonight.
I'll be dropping a baseball bat, a roll of barbed wire and instructions on how to insert it into various orifices on my local MPs doorstep when the battery on my mobility scooter has charged.

Monday, 29 August 2016

I hate airports and air travel in general

I hate airports and air travel in general.
Recently we had a short notice requirement to fly to a wedding.
And they didn't have business class.
I'd rather have driven as you get to see interesting places, people, trees, green fields and what not.
But airports?
I hate airports.
I sat there gazing at the herd (some of whom were literally unwashed), and felt airports are a metaphor for life.
Heaven and hell.
Blue skies and pain.
Practically strip searched before being allowed entry by stern faced gate keepers.
Sitting on uncomfortable chairs for ages in boredom and pain.
Surrounded by steel, plastic and faux-wood outlets selling rubbish at outrageous prices.
Signs everywhere telling you where you're allowed to go and where not.
Deafened periodically by fake calm voices warning you about leaving your life un-attended.
People milling about desperately clutching their crumpled boarding passes as if it was their personality.
And all balefully watched over by machines of unloving grace.
The air of despair and boredom seemed palpable.
It almost felt like most people had a "running fearfully from" rather than a "running joyously to" mentality.
Then standing in line at the gate desperately trying to be first to get into a tin tube filled with economy seats.
Seats? Torquemada would have taken one look at those bum numbing, elbow crushing instruments of torture and smiled.
Jamming your life into lockers and watching others brutally shove theirs in front of yours.
Having a lower back massage for hours provided by the manic kid behind you.
Drinking excessively to drown out the crying children and trying to sleep through the torture.
Arriving at yet another airport virtually indistinguishable from the first.
Frantically pushing through the mindless milling mass to get to the exit.
Oh yes.
I hate airports.
I weep for humanity.

What's your nomination for the worlds worst airport building?
Terminal 4 Heathrow?
The James Watson building LA?

Monday, 12 October 2015

Holy Thor! My blog just got scraped by someone in Israel!

So... Yeah...

I have a blog.
Mostly articles about movies, tech and science.
I get roughly 2,000 to 3,000 views per month.

And recently I posted an article about the recent change of PM in Australia.
It included the word "Palestine".
And on one day... Actually in one hour... I got 1,932 page views.

Wait. What?
I'm not important.
I just comment on some issues I feel relevant to the events of the day.

So just what did my stats show?

Oh lord.
So... I'm not actually saying Mossad have scraped my site.
But seriously...
I have 1,932 pages that feel relevant to someone in Israel?

Wow. Thanks guys.
I had no idea I had written many posts.
Hope you like them.

Wednesday, 16 September 2015

So... Yeah... Australia has a new prime minister... Oh. And goats. And a giraffe.

It was a Monday that's why.

What is it with new these people?

And what is it with the "Prime" part?

Now Optimus Prime had it right.
He led the Transformers for years.
So maybe Mal should change his name to "Malcolm Prime".
Maybe he'd last longer.

And just why do they want to be prime minister?

After all, the first thing our new one did is re-affirm the old ones stance on climate change and marital equality.
Why take the leadership and then say the same as the previous nut job?
Is it the money? The groupies?

And apparently they all still think that marriage equality is "Redefining Traditional Marriage."

It's already been redefined dozens of times you dumb ass.

Imagine 4AD Palestine.
So... Here's my father and Ben comes up, points at me and says "Hey. I'll have that one."

"Oh. Ok." says my father and picks up his holy book.

Starts thumbing through it and says "Oh. Sorry. Forgot. I'm an illiterate goat herder. Let's go and see a holy man."

So we all walk off to the temple because the government hasn't invented public transport yet.
Or clean water.

And the holy man thumbs through the holy book and picks one of the many "Traditional" marriages in his book and says:

"Ah yes. Here's one that fits. That'll be three goats and a cow."

And I'm "What the fuck?" although I can't use that last word because it wasn't invented until medieval times.

So Ben says "Wait. Can't I just have her as a slave and marry her later? Kinda like layby?"

And the holy man grits his teeth and says "Well... That is in the book. But the goats and cow thing is the traditional thing at the moment. So there you go."

And I'm stunned and "Seriously? Hey I'm worth more than that. The surgery alone is going to cost more than that."

So I turn to Ben and say:

"Three goats and a cow? No way dude. You want me you gotta get three goats and a giraffe. Haul your ass down to Kenya and bring back one of those fuckers."

He stares at me.

"And don't be thinking you can just lead it into Jerusalem. You gotta ride that bad boy."

"Traditional Marriage" my ass.

I want an AWESOME marriage.

Monday, 17 August 2015

Deleting/Reinstalling RubyMine on Mac OS-X

I've been upgrading my RubyMine installation for ages now as new versions and updates have occurred.

Recently I had the beginnings of Settings-Hell where settings vanished or inspections switched on or off randomly.

Furthermore I had a bunch of weird "Open-A-File-And-RM-Switches-To-A-Different-Project" issues.

So I decided it was time to whack it from my machine and re-install it.

For posterity here are the steps:

Next create a backup folder to save your existing install if anything goes wrong:

mkdir ~/RubyMineBackup
mkdir ~/RubyMineBackup/Preferences
mkdir ~/RubyMineBackup/Caches
mkdir ~/RubyMineBackup/Application\ Support
mkdir ~/RubyMineBackup/Logs
mkdir ~/RubyMineBackup/Applications

Next RubyMine and under Help->Register copy your user name and license key somewhere safe (such as the backup folder).

Now move all the preferences, caches, logs and the application itself to that backup folder:

mv ~/Library/Preferences/Rubymine70          ~/RubyMineBackup/Preferences
mv ~/Library/Preferences/Rubymine71          ~/RubyMineBackup/Preferences
mv ~/Library/Caches/RubyMine70               ~/RubyMineBackup/Caches
mv ~/Library/Caches/RubyMine71               ~/RubyMineBackup/Caches
mv ~/Library/Application\ Support/RubyMine70 ~/RubyMineBackup/Application\ Support
mv ~/Library/Application\ Support/RubyMine71 ~/RubyMineBackup/Application\ Support
mv ~/Library/Logs/RubyMine70                 ~/RubyMineBackup/Logs
mv ~/Library/Logs/RubyMine71                 ~/RubyMineBackup/Logs
mv /Applications/                ~/RubyMineBackup/Applications

(Obviously you may not need both the 70 and 71 folders. Check your machine for the folders)

Now go to JetBrains and re-download the latest version.
Start it up and enter your registration details.

FYI While starting I tend to switch to the "Darcula" theme.

Now shut RM down and do this to start RM under JDK 1.7 or newer:

vi /Applications/

Roughly line 87, you'll see this:


Change the "" value to this:


I like more memory as I often have up to 7 or 8 projects open simultaneously.

So copy the rubymine.vmoptions file:

cp /Applications/ ~/Library/Preferences/rubymine70

Now edit the ~/Library/Preferences/rubymine70rubymine.vmoptions file from this:


To this:


Now re-start RubyMine.

Once it's up install your plugins.
I use these ones:

Docker integration
Markdown support
Bootstrap 3
Git Flow Integration
GitLab integration

YMMV but mine seems to be much more stable now.

Friday, 24 July 2015

"rvm install jruby-" insists on installing pre1, rc1 or rc2

So... Yeah...

Been eagerly awaiting jruby-9000. And used rvm to install the pre1, rc1 and rc2 versions for testing against micro-services.

Then crashed right into a problem when the final release came out.

I tried to "rvm install jruby-" and it said there was already a cached version "ruby-".

Ok I thought, so I did "rvm list" and uninstalled all the previous jrubies.

Then removed any reference to jruby from "~/.rvm/archives".

Then "rvm get stable".

Then "rvm install jruby-" again.

To my chagrin, it did this:

Searching for binary rubies, this might take some time.
Found remote file
...compilation elided...

Guessing that there may actually be a release version on s3, I wget'd ""

Luckily that worked and I copied the file to "~/.rvm/archives".

I uninstalled and removed the other "pre1" version and tried again.

But no.
Despite having jruby-bin- in the archives folder, rvm insists on downloading the pre1 version.

Then the "Ahaha!"

After mucking about with rvm --debug and --trace commands I found this wonderful thing in the output (which was frickin ginormous):

+ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  12 > [[ -z jruby-9\.0\.0\.0.* ]]

#Ed: This looks interesting...
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  -221 > command cat /Users/kimberleyscott/.rvm/config/known_strings

++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  -219 > __rvm_version_sort
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  -218 > __rvm_tail -n 1

#Ed: Notice the regex
++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  -220 > __rvm_grep 'jruby-9\.0\.0\.0.*'

++ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  -463 > cat /Users/kimberleyscott/.rvm/config/known_strings
++ 1437712726.N /scripts/functions/support : __rvm_tail()  0 > tail -n 1
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort()  1 > LC_ALL=C
++ 1437712726.N /scripts/functions/support : __rvm_grep()  0 > GREP_OPTIONS=
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort()  1 > command sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n
++ 1437712726.N /scripts/functions/support : __rvm_grep()  0 > command grep 'jruby-9\.0\.0\.0.*'
++ 1437712726.N /scripts/functions/utility : __rvm_version_sort()  -167 > sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n
++ 1437712726.N /scripts/functions/support : __rvm_grep()  -260 > grep 'jruby-9\.0\.0\.0.*'

# Ed: and here is the result:
+ 1437712726.N /scripts/functions/selector_parse : __rvm_ruby_string_latest()  20 > new_ruby_string=jruby-

Well... "~/.rvm/config/known_strings" looks like an interesting file doesn't it?

And lo and behold, I can now see how the rvm script decided on pre1.
so I changed this:

# this strings are matched only when partial version was provided

to this:

# this strings are matched only when partial version was provided
#jruby- - commented for safety

And did a fresh "rvm --debug install jruby-".
Loads of green and purple output.
But wayhey! Installed.

rum now shows it installed:

rvm rubies

 * jruby-1.7.19 [ x86_64 ]
   jruby-1.7.20 [ x86_64 ]
   jruby-1.7.21 [ x86_64 ]
=> jruby- [ x86_64 ]
   ruby-2.2.0 [ x86_64 ]
   ruby-2.2.1 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Hope this helps others!

Wednesday, 22 April 2015

Resonant Rise 3 Java Settings to reduce lag

I've begun a new Youtube series covering Resonant Rise 3 (
In the process I discovered it lags.

As my Linux server decided to sulk and fail to boot, I'm using a late model Mac Mini as a server.
The clients are late model iMacs.
I'm organising a replacement linux server which I will use in our upcoming videos.

So I did a metric shit ton of digging and finally found a series of settings for the server and client that reduce that lag considerably.
You keep getting:

"Can't keep up! Did the system time change"


Then do this.

On your servers

set -x
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
export PATH=${JAVA_HOME}/bin:${PATH}
opts="-server -XX:+TieredCompilation \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \
java -Xmx2G -XX:MaxPermSize=256M $opts -jar forge-1.7.10- nogui

(Slashes added for readability)

Of course this assumes you're using Java 1.7 update 71.
I tried JDK 1.8 and it gave me a whole bunch of grief.
So I decided to switch back to JDK 1.7 and see if that helped.
It did.
Suddenly the Mac Mini used all 4 cores instead of just 2 and the client side (iMac) sped up considerably.

Ok. Now client side.
In the ATLauncher settings, choose 'Settings' and:

For the Java path use: /Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
(Again assuming you have 1.7 update 67 - change to suit)

And for the Java parameters:

-server -XX:+TieredCompilation \
-XX:CompileThreshold=1500 \
-XX:-DontCompileHugeMethods \
-XX:+UseCodeCacheFlushing \
-XX:ReservedCodeCacheSize=256m \
-XX:+UseBiasedLocking \
-XX:BiasedLockingStartupDelay=0 \
-XX:NewRatio=3 \
-XX:+UseParNewGC \
-XX:+UseConcMarkSweepGC \
-XX:+DisableExplicitGC \
-XX:+CMSIncrementalMode \
-XX:+CMSIncrementalPacing \
-XX:+CMSParallelRemarkEnabled \
-XX:+UseCompressedOops \
-XX:CMSInitiatingOccupancyFraction=30 \

(Slashes added for readability)



I'm still hunting for "The Perfect Seed" for videos, and will get back to making videos as soon as my current IRL workload decreases.

Wednesday, 1 April 2015

Where does chrome store open tabs information?

Recently I had a problem with a upgrade from Mavericks to Yosemite.
The upgrade failed.
But I had backed up all the main folders I might need in case of such a folder.

For reference, these are:

- /private
- /Library
- /Applications
- /Users/my_home_folder

I had to burn the machine and install Yosemite from scratch.

Now one of the things I wanted to recover was the current tabs I had open in Chrome.
The reason being was that some of them were very, very interesting and I had not bookmarked them.

I did a little bit of research, but not much turned up.
So I figured it out myself.

Let's say you have a folder ~/OldMachineBackup and it has the folders mentioned above in it.

So to find out what tabs you had open:

cd ~/OldMachineBackup
strings Application\ Support/Google/Chrome/Default/Current\ Tabs | egrep '^http' | sort | uniq

And there you have them. A list of http addresses.

Wednesday, 18 March 2015

Upgrading the docker service from 1.3 to 1.5 on Ubuntu 14.04

Recently I had to upgrade a production server to ensure it was running the latest version of docker (1.5.0 at time of writing).

The current install was 1.3.1 and we wanted all docker servers to be identical.

First up, assume you have done a sudo -i to ensure all commands are run as root.

Also, some commands are prefixed with $ . This is to identify the command from it's output.

And further, I have used bogus IPv4 addresses for certain URLs.

For reference, I used as the docker server IP.

# First some useful commands
# Useful to find files in packages or use

apt-file search nslookup

# -------------------------------------------------------------------
# Install tree and dnsutils (nslookup and friends)
# -------------------------------------------------------------------

apt-get install tree dnsutils

# -------------------------------------------------------------------
# Kill all containers
# -------------------------------------------------------------------
docker ps -a | egrep 'ls-api' | awk '{ print $NF; }' | xargs docker kill
docker ps -a | egrep 'ls-api' | awk '{ print $NF; }' | xargs docker rm

# -------------------------------------------------------------------
# Kill all images
# -------------------------------------------------------------------
docker images -q --filter "dangling=true" | xargs docker rmi
docker images | grep -v REPOSITORY | awk '{ print $3; }' | \
  sort | uniq | xargs docker rmi

# -------------------------------------------------------------------
# Stop docker
# -------------------------------------------------------------------
service docker stop

# -------------------------------------------------------------------
# Uninstall (You may need to do 'aptitude search docker'
# to see if it is installed. If you do not have 'docker' installed,
# but 'lxc-docker', then remove that instead
# -------------------------------------------------------------------
apt-get remove

# -------------------------------------------------------------------
# Cleanup any remaining files you want from:
# /var/lib/docker 
# /etc/init.d 
# /etc/default/docker
# /var/log/docker* 
# Your choice.
# -------------------------------------------------------------------

# -------------------------------------------------------------------
# Install AUFS support
# -------------------------------------------------------------------
apt-get update
apt-get install linux-image-extra-`uname -r`

# -------------------------------------------------------------------
# Fix keys
# -------------------------------------------------------------------
apt-get update
apt-key adv --keyserver hkp:// \
  --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

# -------------------------------------------------------------------
# Update your apt sources
# Note: First check your /etc/apt/sources.list.d/docker.list to see 
#       if it already has this
# -------------------------------------------------------------------
sh -c "echo deb docker main > /etc/apt/sources.list.d/docker.list"

# -------------------------------------------------------------------
# Install latest docker 
# -------------------------------------------------------------------
apt-get update
apt-get install lxc-docker

# Note: During install, yo may get a message about 
#       /etc/init/docker.conf being present.
#       If so, choose Y to overwrite your old one with the new one.

# -------------------------------------------------------------------
# Change /etc/default/docker:
# -------------------------------------------------------------------

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns --dns"
DOCKER_OPTS="-H tcp:// \
  -H unix:///var/run/docker.sock \
  --dns \                      <<- Your local DNS
  --dns \                      <<- services
  --insecure-registry"    <<- If you have a private repo

# -------------------------------------------------------------------
# Look at the upstart jobs:
# -------------------------------------------------------------------
service --status-all
 [ + ]  apparmor
 [ ? ]  console-setup
 [ + ]  cron
 [ - ]  docker
 [ - ]  grub-common
 [ ? ]  killprocs
 [ ? ]  kmod
 [ ? ]  networking
 [ + ]  ntp
 [ ? ]  ondemand
 [ ? ]  open-vm-tools
 [ + ]  postfix
 [ - ]  procps
 [ + ]  puppet
 [ + ]  rabbitmq-server
 [ ? ]  rc.local
 [ + ]  resolvconf
 [ - ]  rsync
 [ + ]  rsyslog
 [ ? ]  sendsigs
 [ + ]  snmpd
 [ - ]  ssh
 [ - ]  sudo
 [ + ]  udev
 [ ? ]  umountfs
 [ ? ]
 [ ? ]  umountroot
 [ - ]  unattended-upgrades
 [ - ]  urandom

# -------------------------------------------------------------------
# Restart the service to enable AUFS support
# -------------------------------------------------------------------
service docker restart

# -------------------------------------------------------------------
# Get info
# -------------------------------------------------------------------
$ docker info
Containers: 0
Images: 0
Storage Driver: aufs        <-- AUFS
 Root Dir: /mnt/docker/aufs <-- AUFS
 Backing Filesystem: extfs
 Dirs: 0
Execution Driver: native-0.2
Kernel Version: 3.13.0-24-generic
Operating System: Ubuntu 14.04.1 LTS
CPUs: 16
Total Memory: 15.67 GiB
Name: dock-prod-001

# Your ID will be different of course 

# -------------------------------------------------------------------
# Start Seagull to have a pretty interface to containers
# See
# -------------------------------------------------------------------
docker run -d \
  -p 10086:10086 \
  -v /var/run/docker.sock:/var/run/docker.sock \
  --name=Seagull \

# Browse via your desktop to

# -------------------------------------------------------------------
# Install Elastic
# See
# The '_' in the URL means it's an official image
# -------------------------------------------------------------------
docker run -d \
  -p 9200:9200 -p 9300:9300 \
  -v /some/path/to/elastic_search_data:/data \
  --name=Elastic \
  elasticsearch \
  elasticsearch -Des.config=/data/elasticsearch.yml
# Note: The first 'elasticsearch' is the image, and
#       the second 'elasticsearch' is the command plus options

# Browse to and

# -------------------------------------------------------------------
# Install Redis
# See
# -------------------------------------------------------------------
docker run -d \
  -p 6379:6379 \
  -v /some/path/to/redis_data:/data \
  --name=Redis \
  redis redis-server \
  --appendonly yes
# Note: The 'redis' is the image, and
#       the 'redis-server' is the command plus any options

# -------------------------------------------------------------------
# Install redis command line tools
# So you can interact with the Redis container
# -------------------------------------------------------------------
apt-get update
apt-get install redis-tools

# -------------------------------------------------------------------
# Test
# -------------------------------------------------------------------
# First go to the redis_data folder which was defined via the start
$ cd redis_data
# Let's look at the data store
$ ls -l appendonly.aof
total 0
-rw-r--r-- 1 deploy docker 0 Mar 18 09:24 appendonly.aof
# Empty, so let's add a key
$ redis-cli> keys *
(empty list or set)> set hello world
OK> keys *
1) "hello"> get hello
"world"> quit
# Now let's look at it
$ ls -l appendonly.aof
total 4
-rw-r--r-- 1 deploy docker 58 Mar 18 09:33 appendonly.aof
# Ooo. Changed, so let's see if we can view that file
$ file appendonly.aof
appendonly.aof: ASCII text, with CRLF line terminators
# Yup. So let's look at it:
$ cat appendonly.aof

# -------------------------------------------------------------------
# Look at the containers:
# -------------------------------------------------------------------
$ docker ps -a
CONTAINER ID IMAGE                      COMMAND              CREATED        STATUS        PORTS                                          NAMES
c758b7dc90e5 redis:latest               "/ redi 4 minutes ago  Up 4 minutes>6379/tcp                         Redis
310ccb182746 elasticsearch:latest       "elasticsearch -Des. 8 minutes ago  Up 8 minutes>9200/tcp,>9300/tcp Elastic
e78470ddebca tobegit3hub/seagull:latest "./seagull"          30 minutes ago Up 30 minutes>10086/tcp                       Seagull

# -------------------------------------------------------------------
# Start doing your own deployments!
# -------------------------------------------------------------------