Blender Fox


School dropout codes chat program that foils NSA spying (Wired UK)

#

The National Security Agency has some of the brightest minds working on its sophisticated surveillance programs, including its metadata collection efforts. But a new chat program designed by a middle-school dropout in his spare time may turn out to be one of the best solutions to thwart those efforts.

School dropout codes chat program that foils NSA spying (Wired UK).

School dropout creates messaging app that foils NSA spying

#

Incredible Women's Volleyball Rally In China

#

https://www.youtube.com/watch?v=taK6En7NEmk

Incredible Women’s Volleyball Rally In China - YouTube.

3D or not 3D

#

See how you fare

www.youtube.com/watch

3D or not 3D | Blender Nerd.

Why I don't use Public Transport to travel to work

#

People tell me I should use public transport to save on money, so I decided to check cost differences.

To use buses only, would take me 2 hours on a good day, and on a bad day, possibly 3 hours to get from one end to the other. A single bus fare would cost me £2.40 (2 buses), costing £24 a week.

To use underground only, would take me 1.5 hours to 2 hours on an average day. I have to travel from Zone 5 to Zone 1. I travel during the peak so that costs me £4.60 each way, total of £9.20 per day, or £46 per week.

If I wanted the flexibility of using both, a monthly season ticket between Zones 1 and 5 costs me £205.10 or £51.28 per week.

Buses, so far are the cheapest option, but they are the slowest (at 2-3 hours) and are most prone to have disruptive commuters (school kids, drunks, smokers)

But what about if I use a car? In a car it takes me 30-45 minutes to get to work in the morning, and about the same to get home. If I hit a peak of traffic, it maybe, at worse, 1.5 hours. Compare that to a 1.5 hours BEST case on the underground and 3 hours WORST case on the buses.

Here’s my breakdown of costs:

Diesel: Approx £16 pw – I fill up every 3 or so weeks, and on everage, it is about £16 per week of fuel

Road Tax: £0.39 pw (£20 per year)

MOT: £1.05 pw (£54.85 py)

Service (Full): £6.05 pw (£314.36 py) – including work done. If no work actually needs to be done, then this is much lower.

Tyres (4): £4.58 pw (£238 py) – assuming I have to change all tyres at least once a year. Not likely as I don’t do too much mileage, and I have only had to change the tyres once since buying the car.

Insurance: £8.65 pw (£450 py)

Total Cost Per Week: £36.72

So, even with the worst case scenario (lots of work to do on the service and yearly replacing of the tyres), my weekly running cost is STILL less than a season ticket on the Public Transport (and I also get to and from work a HELL of a lot faster).

The FCC Received 3.7 Million Net Neutrality Comments

#

C25K - Week 8 Day 2

#

I completed C25K Week 8 Day 2 (4.43 km), in 22:38, pace 05:06 min/km, with @RunDouble http://rndb.co/z5kA

A better run today. Only dropped to a walk once, and it shows in my pace time. It’s been a while since I hit close to 5:00 min/km.

Nike+ Track

Chinese city paints street lane for mobile phone users - Telegraph

#

Chinese city paints street lane for mobile phone users - Telegraph.

C25K - Week 8 Day 1

#

I completed C25K Week 8 Day 1 (4.44 km), in 24:11, pace 05:26 min/km, with @RunDouble http://rndb.co/u5iq

First successful run in a long while - and work hasn’t exactly helped matters. My overall fitness has therefore been diminished somewhat.

Week 8 is a toughie. 4.4km. I reverted back to an old 5km running route, but still dropped down to a walk a few times. Going run run Week 8 several times before moving on.

Nike+ Track

Building Docker.io on 32-bit arch

#

NOTE: Automated 32-bit-enabled builds are now available. See this page for link details.

EDIT 29th September 2015: This article seems to be quite popular. Note that Docker has progressed a long way since I wrote this and it has pretty much broken the script due to things being moved around and versions being updated. You can still read this to learn the basics of LXC-based in-container compiling, and if you want to extend it, go right ahead. When I get a chance, I will try to figure out why this build keeps breaking.

Steps to compile and build a docker.io binary on a 32-bit architecture, to work around the fact the community does not support anything other than 64-bit at present, even though this restriction has been flagged up many times.

A caveat, though. As the binary you compile via these steps will work on a 32-bit architecture, the Docker images you download from the cloud may NOT work, as the majority are meant for 64-bit architectures. So if you compile a Docker binary, you will have to build your own images. Not too difficult – you can use LXC or debootstrap for that. Here is a quick tutorial on that.

I am using a LXC container to do my build as it helps control the packages plus it reduces the chances of a conflict occurring between two versions (e.g. one “dev” version and one “release” version of a package), plus, the LXC container is disposable - I can get rid of it each time I do a build.

I utilise several scripts – one to do a build/rebuild of my LXC container, one to start up my build-environment LXC container and take it down afterwards; and the other, the actual build script. To make it more automated, I setup my LXC container to be allow a passwordless SSH login (see this link). This means I can do a scp into my container and copy to and from the container without having to enter my password. Useful because the container can take a few seconds to startup. It does open security problems, but as long as the container is only up for the duration of the build, this isn’t a problem.

EDIT: One note. If you have upgraded to Ubuntu’s Utopic Unicorn version, you may end up having to enter your GPG keyring password a few times.

EDIT 2: A recent code change has caused this build script to break. More details, and how to fix it on this post.

As with most things linux and script-based. There’s many ways to do the same thing. This is just one way.


Script 1: rebuildDockerLXC.sh

This script does the rebuild of my LXC build environment

First, I take down the container if it already exists. I named my container “Ubuntu” for simplicity.

lxc-stop -n Ubuntu

Next, destroy it.

lxc-destroy -n Ubuntu

Now create a new one using the Ubuntu template. Here, I also inject my SSH public key into the container so I can use passwordless SSH

IMPORTANT NOTE: If you are NOT running Ubuntu Trusty, you MUST use the “–release” option. If you are running on an x86 architecture, and want to compile a 32-bit version, you MUST also use the “–arch i386” (otherwise LXC will pull the amd64 packages down instead). There is a problem with the Go build script with Utopic. Hopefully to be fixed at some point in the future.

lxc-create -n Ubuntu -t ubuntu – –release trusty –arch i386 –auth-key /home/user/.ssh/id_rsa.pub

Start up the container, and send it to the background

lxc-start -n Ubuntu -d

Wait till LXC reports the IP address of the container, then assign it to a variable for reuse later. We do this by waiting for LXC to report the IP then running ‘ifconfig’ within the container to get the IP as seen by the container. The ‘lxc-info’ command can return two IP addresses – the actual one, and the bridge, and it is not always obvious which one is which.

while [ lxc-info -n Ubuntu | grep IP: | sort | uniq | unexpand -a | cut -f3 | wc -l -ne 1 ]; do sleep 1s done IP=lxc-attach -n Ubuntu – ifconfig | grep ‘inet addr’ | head -n 1 | cut -d ‘:’ -f 2 | cut -d ' ' -f 1

echo Main IP: $IP

Container is setup, take it down now.

lxc-stop -n Ubuntu


Script 2: compilerDocker.sh

This script is the wrapper script around the build process. It starts up the build container, runs the build in the container, then pulls the resulting output from the container after the build is done, extracting it to the current folder

First, check if we should rebuild the build environment. I normally do, to guarantee a clean slate each time I run the build.

echo -n “Rebuild Docker build environment (Y/N)? " read REPLY case “$REPLY” in Y|y) echo Rebuilding docker build environment ./rebuildDockerLXC.sh #If you want to rebuild the LXC container for each build ;; N|n|*) echo Not rebuilding docker build environment ;; esac

Start/restart the build container

lxc-stop -n Ubuntu lxc-start -n Ubuntu -d

Get the IP address of the container

while [ lxc-info -n Ubuntu | grep IP: | sort | uniq | unexpand -a | cut -f3 | wc -l -ne 1 ]; do sleep 1s done IP=lxc-attach -n Ubuntu – ifconfig | grep ‘inet addr’ | head -n 1 | cut -d ‘:’ -f 2 | cut -d ' ' -f 1 echo Main Container IP: $IP

Now push the compile script to the container. This will fail whilst the container starts up, so I keep retrying

echo Pushing script to IP $IP scp -o StrictHostKeyChecking=no -i /home/user/.ssh/id_rsa /home/user/dockerCompile.sh ubuntu@$IP:/home/ubuntu while [ $? -ne 0 ] do scp -o StrictHostKeyChecking=no -i /home/user/.ssh/id_rsa /home/user/dockerCompile.sh ubuntu@$IP:/home/ubuntu done

With the container started, we can invoke the compile script within the container. This does the build and will take a while.

lxc-attach -n Ubuntu ‘/home/ubuntu/dockerCompile.sh’

Now, after the build is done, pull the results from the container

scp -o StrictHostKeyChecking=no -i /home/user/.ssh/id_rsa ubuntu@$IP:/home/ubuntu/*.txz .

Take down the container

lxc-stop -n Ubuntu

Extract the package for use

for a in ls *.txz do echo Extracting $a tar -xvvvf $a && rm $a done

Done.


Script 3: dockerCompile.sh

This script is run inside the container and performs the actual build. It is derived mostly from the Dockerfile that is included in the Docker.io repository, with some tweaks.

First, we install the basic packages for compiling

cd /home/ubuntu echo Installing basic dependencies apt-get update && apt-get install -y aufs-tools automake btrfs-tools build-essential curl dpkg-sig git iptables libapparmor-dev libcap-dev libsqlite3-dev lxc mercurial parallel reprepro ruby1.9.1 ruby1.9.1-dev pkg-config libpcre* –no-install-recommends

Then we pull the Go repository.

hg clone -u release https://code.google.com/p/go ./p/go cd ./p/go/src ./all.bash cd ../../../

We setup variables for the Go environment

export GOPATH=$(pwd)/go export PATH=$GOPATH/bin:$PATH:$(pwd)/p/go/bin export AUTO_GOPATH=1

Next, we pull from the lvm2 repository to build a version of devmapper needed for static linking.

git clone https://git.fedorahosted.org/git/lvm2.git cd lvm2 (git checkout -q v2_02_103 && ./configure –enable-static_link && make device-mapper && make install_device-mapper && echo lvm build OK!) || (echo lvm2 build failed && exit 1) cd ..

EDIT see this link for extra code that should go here.

Next, get the docker source

git clone https://github.com/docker/docker $GOPATH/src/github.com/docker/docker

Now the important bit. We patch the source code to remove the 64-bit arch restriction.

for f in grep -r “if runtime.GOARCH != "amd64" {” $GOPATH/src/* | cut -d: -f1 do echo Patching $f sed -i ’s/if runtime.GOARCH != “amd64” {/if runtime.GOARCH != “amd64” && runtime.GOARCH != “386” {/g' $f done

Finally, we build docker. We utilise the Docker build script, which gives a warning as we are not running in a docker environment (we can’t at this time, since we have no usable docker binary)

cd $GOPATH/src/github.com/docker/docker/ ./hack/make.sh binary cd ../../../../../

Assuming the build succeeded, we should be able to bundle the binaries (this will be copied off by the compileDocker.sh script)

cd go/src/github.com/docker/docker/bundles for a in ls do echo Creating $a.txz tar -cJvvvvf $a.txz $a mv *.txz ../../../../../../ cd ../../../../../../ done


And that’s it. How to build docker on a 32-bit arch.

Turin, Italy chooses Ubuntu, ditches Windows

#

Munich tried then ditched Linux. I wonder if Turin fares any better.

Toilet Warning

#

Seriously?!

Zak Ebrahim: I am the son of a terrorist. Here's how I chose peace

#

TED videos are always inspirational. With all the fighting going on in and around, it is nice to know that there are some who refuse to follow in the footsteps of their extremist forefathers.

www.youtube.com/watch

Bride shares final dance with her dying father and it will break your heart

#

If this doesn’t make you at least slightly tear up, you must have a heart of stone. Knowing what its like to have your own father in hospital, I can feel for Lisa.

I nominate...

#

Impatience

#

The impatience of one driver nearly causes an accident…

www.youtube.com/watch

Littering a river is bad karma

#

Karma can be a bitch…

www.youtube.com/watch

25 Surprisingly Satisfying Facts About Coffee - YouTube

#

Humourously, I am watching this while drinking a large Americano from Costa

www.youtube.com/watch

LPIC-1

#

[caption id="" align=“alignright” width=“234” class=“zemanta-img”]Linux Professional Institute Logo Linux Professional Institute Logo (Photo credit: Wikipedia)[/caption]

First step achieved towards LPIC-1. Part 1 complete, part 2 commence! :)

Score was 710. Pass mark was 500. Score ranges from 200 to 800, so if my score was 710/800, that makes it 88.75%. Not a bad score.

I arrived 30 minutes early, and the test centre allowed me to take the test early, although we had some troubles getting the exam started (technology, eh?)

However, once started, I clicked through the questions, and felt reasonably happy with the level of questions, even though I evidently got quite a few wrong on the System Architecture section.

I chuckled when the receptionist asked to take a picture of me to compare against the last picture (to verify I was who I said I was) and then promptly asked me “have you lost weight since the last time you were here?”

Um… I don’t think so? :P

Breakdown of topics:

I am going to see if I can find out which questions I got wrong. Would be nice to know so I can learn for future.

Bomb Technician

#

 

Try to keep up ^_^

download (1)

Inhaler

#

I’m sure the label says that you are supposed to use it - not your cat….

Driving

#

Been a while since I last posted anything related to bad driving, but here’s one. A Mercedes grew impatient waiting in line (don’t they always?), cut out of line, jumped several cars, cut in, then turned left. Video below

youtu.be/amqUP1KWo…

C25K - Week 7 Day 3

#

I completed C25K Week 7 Day 3 (4.02 km), in 19:58, pace 04:57 min/km, with @RunDouble http://rndb.co/Y5el

This is the last run of Week 7. Next run is of Week 8, and is 4.4km. Trying to do 4K was really tough and I was really struggling the last 1K. When I try Week 8 if it is too tough, I’ll drop back to Week 7 till I’m comfortable with 4K and then take it up to 4.4K.

Thought of the Day

#

5049340990_4a026d1bdd_o

C25K - Week 7 Day 2

#

I completed C25K Week 7 Day 2 (3.68 km), in 20:04, pace 05:27 min/km, with @RunDouble http://rndb.co/55fm