A variety of Virtual Networking

Trying to make a variety of different virtualisation (VirtualBox & KVM) and containers (Docker) systems run together on a single virtual network on my home server. With help from various sources including:

  • http://arjunstechblog.blogspot.com/2011/06/how-to-migrate-from-virtualbox-to-kvm.html

    [Post to be continued as work progresses!]

Int != Integer

A very annoying 'feature' of SQLite, it treats INT & INTEGER as different when considering in CREATE TABLE if the PRIMARY KEY column in a table should be marked as the rowid (used in autoincrement) or not. So although the column is created as an integer, it won't be incremented, the default hidden rowid column will be used instead. See "rowid":https://www.sqlite.org/langcreatetable.html#rowid for the gory details.

So, in summary, always write INTEGER.

CREATE TABLE company (id INTEGER PRIMARY KEY, name VARCHAR(255);

8GB Memory Woes

Trying to be clever (always a mistake) I bought a 8GB RAM stick (Corsair XMS3) which I thought I could add to my aging Gigbyte GA-H55N-USB3 Mini-ITX motherboard (supports upto 8GB it claims) and then, when the call to the great motherboard in the sky came, I could transfer it to a new Intel NUC, add another 8GB stick and double upto 16GB.

I initally forgot it (Gigabyte board) could only support 8GB and stuck it in with one of the existing 2GB sticks, which seemed to work well until memory usage went over 2GB and suddenly the system crashed (no errors), presumably the memory wasn't really available or some timing issue stopped it working. Removing the 2GB stick though (so down just to 8GB, which should in theory be fine) has just lead to it getting stuck in a boot cycle, not even able to get to the BIOS. I've tried to reduce some of the memory options to the minimum and stuck everything on Auto but still it isn't picked up. Possible (see this lengthly exchange: http://www.tomshardware.co.uk/forum/280564-30-h55n-usb3-doesnt-post-rebooting-gskill-ripjaws) it could be something to do with the CPU, perhaps something wrong with the memory controller on the i3.

Anyway, the best laid plans... So the 8GB stick will be in storage for the moment until I order the Intel NUC.

Docker on Debian

Getting docker running on Debian 7 (with some stuff from testing, with home rolled kernel, i.e. all over the place)

  • Enable thin provisioning for devicemapper/LVM in kernel
  • Enable bridge module for networking in kernel
  • Enable CONFIGNETFILTERXTMATCHADDRTYPE in kernel if not already enabled (See "Issue 4088":https://github.com/docker/docker/issues/4088) (needs Netfilter Advanced option on)
  • Turn on IPV4 Forwarding in /etc/sysctl.conf (then run sysctl -p)
  • Add non-root user to the docker group (adduser [name] docker) - Be aware this effectively gives root access - see "Docker Attack Surface":https://docs.docker.com/articles/security/#docker-daemon-attack-surface
  • (Then if logged in su [username] to update your groups)

Let the docking begin!

Debian pdiffs

Finally irritated enough by the hundreds of diff files apt-get update downloads to find an answer:

apt-get update -o Acquire::Pdiffs=false

for a session, or set that in /etc/apt/apt.conf. Of course if you are running this command often the diffs files make sense.

CVS import + repository merging to single git repo

Recording this process on the off-chance I need it again:

git init [reponame] cvs co [reponame] cd [reponame] find . -name "CVS" -exec rm -rf {} \; # (Remove CVS subdirs, bit ugly) git add .

Now in CVS repo, use cvs2git tools - follow advice from the excellent blog post by Oliver Gorwits - - make sure you update the project name in options files

cvs2git --options=cvs2git.options --fallback-encoding utf-8

Now back in the git repo

cat ~/CVS/cvs2svn-tmp/git-{blob,dump}.dat | git fast-import

There may or may not be some updated files to commit

git status

cd .. git clone --bare [reponame] [reponame].git

Now follow the answer from ColinM from http://stackoverflow.com/questions/1683531/how-to-import-existing-git-repository-into-another or use subtree if you have git > 1.7.11

Digital Unwrapping of Ancient Scrolls - Progress ?

Trying to make sense of the various projects aiming to digital unwrap and read fragile scrolls.

EDUCE University of Kentucky

Date Technology Material Story
2004 CT Scanner, Custom Built Scanner Various http://www.research.uky.edu/odyssey/fall04/seales.html
2009 CT Scanner Herculaneum Scolls (Paris) http://www.kentucky.com/2009/05/19/800210/uk-to-unroll-papyrus-scrolls-buried.html
2010 X-Ray Scanner (Custom Built) Herculaneum Scrolls http://rogueclassicism.com/2010/05/29/herculaneum-papyri-and-the-educe-project-update/
2012 Multispectral Imaging Various (Herculaneum, Manuscripts) http://arstechnica.com/science/2012/05/coolest-jobs-in-tech-decoding-life-touring-solar-systems/2/

CPART (Brigham Young University)

Date Technology Material Story
2001 Multispectral Imaging Herculaneum Scrolls (Italy) http://magazine.byu.edu/?act=view&a=43

Oxford Centre for Study of Ancient Documents

Date Technology Material Story
2005 Multispectral Imaging Oxyrnchus Papyrus http://news.nationalgeographic.co.uk/news/2005/04/0425_050425_papyrus.html
2011 Crowdsourcing Oxyrnchus Papyrus http://ancientlives.org/
2014 Reflectance Transformation Imaging (RTI) Philae Obelisk http://www.bbc.co.uk/news/science-environment-29734975

Queen Mary / Cardiff

Date Technology Material Story
2013 X-ray (high contrast microtomography) C12-19th manuscripts (using iron gall ink) http://www.rsc.org/chemistryworld/2013/05/digitally-unrolling-historical-scrolls-x-ray

CNR Institute for Microelectronics and Microsystems

Date Technology Material Story
2016 X-Ray phase contrast tomography (XPCT) Herculaneum scrolls http://www.rsc.org/chemistryworld/2016/03/ancient-scrolls-herculaneum-papyrus-x-ray-fluorescence-ink

test3

Natural Light Computing

Trying out the f.lux software that adjusts the colour of your monitor to follow the time of day, so brighter during the day and warmer at night.

Update: f.lux good but only works on primary monitor, switched to redshift instead which handles both.

Android, Phonegap, and JQuery

Have made two attempts now to use phonegap and jquery mobile for quick app development. Both times (last year and last month) impressed with how quickly a working app can be put together, but then frustrated by the slowdown that hits the app whenever you actually try to do something (show big list, search data, filter list, etc). Despite a lot of good work on it, it's just unusable for anything more than demoing ideas. Last time I switched back to developing the app for Android only in code, this time I'm giving jqmobi, Intel App Framework (really bad name, hard to search for) a go. So far so good, although nowhere near as advanced as JQuery. But perhaps that's why it still works.

Another blog

Another attempt to keep a blog going. Mainly for notes to self and things I must share with the world but can't get to fit into 140 characters.