Random Picture

See all Header Images.

10 Weblog posts

MiniBoyGeek Inteface

It has been a long while since I have done anything with the Affordable Accessible Mouse Project, MiniBoyGeek is getting more and more into bashing buttons and the ilk, so perhaps it is time to resurrect the project in the form of a MiniBoyGeek Interface. I got the layout from this layout page, it is one normally used on arcade machines; however since I still had some Arcade buttons and a joystick laying around, it seemed like a sensible thing to use as a starting point.

Dimensions of the buttons etc

I have three 37 mm Arcade buttons, a number of coloured square buttons from my K9, I also have two slides laying around, and a Joystick, so lets see what we can do with these parts:


If you spend any time making boxes or things on a laser cutter, you will know about the inkscape box maker plugin, however I don't like Inkscape, but do use Fusion 360, and it turns out there is a Fusion 360 boxmaker plugin.

I have a fair amount of A41) Laser ply, so I think I will try to make my box out of those, I have entered the values 260 width x 180 height x 75 depth (3mm wall).

New Machine, and Auto Deploy

following on from Self deploying R-Pi

#!/usr/bin/env bash


#--- Display the 'welcome' splash/user warning info..
echo ""
echo "############################################################"
echo "  Skippy has a new machine setup version $VERSION  "
echo "############################################################"
echo "Some commands  will need root privilages, you will be prompted for passwords then."

echo -e "\nChecking that minimal requirements are ok"
# Ensure the OS is compatible with the launcher

OS=$(uname -s)
VER=$(uname -r)
ARCH=$(uname -m)

echo "Detected : $OS  $VER  $ARCH"
if [[ "$OS" = "CentOs" && ("$VER" = "6" || "$VER" = "7" ) || 
      "$OS" = "Darwin" && "$ARCH" = "x86_64" || 
      "$OS" = "Linux" && "$ARCH" = "armv6l" || 
      "$OS" = "Ubuntu" && ("$VER" = "12.04" || "$VER" = "14.04" ) || 
      "$OS" = "debian" && ("$VER" = "7" || "$VER" = "8" ) ]] ; then
      echo "Ok."
    echo "Sorry, this OS is not supported by me yet :(" 
    exit 1

# Lets start installing things:

## Preflight
# Stuff that happens anyway!
# This command makes new SSH keys without needing manual intervention (if not already one).

if [ ! -f $HOME/.ssh/id_rsa.pub ]
    ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''
    echo "there is already an SSH key on this machine..."
# This command moves the new key to the server (if it doesn't already exist on the server, hence no need to check).
ssh-copy-id [email protected]

# Darwin is OS X
if [[ "$OS" = "Darwin" ]] ; then
## Brew
# Brew is amazing, everyone should use Brew if you have a mac.
	/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
	brew install wget fish git nginx mosh tmux dialog

# this needs to be done here, as the configuration for nginx and other things require parts of this.
git clone ssh://[email protected]:/home/skippy/config.git

# This is to get nginx to start at boot on port 80
# see https://derickbailey.com/2014/12/27/how-to-start-nginx-on-port-80-at-mac-osx-boot-up-log-in/ for details.

## The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo, 
## however we want it to run on port 80.
sed -i 's/8080/80/g' /usr/local/etc/nginx/nginx.conf

sudo cp /usr/local/opt/nginx/*.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.nginx.plist

# At the moment the webroot is /usr/local/var/www, I would prefer it to be ~/Sites
rm -r /usr/local/var/www
mkdir -p $HOME/Sites/
ln -s $HOME/Sites/ /usr/local/var/www
# you will get an error if there is nothing that nginx can serve in the folder.
echo "it works" > ~/Sites/index.html
echo "<?php phpinfo();" > ~/Sites/php.php

# Now to get PHP7.1

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew install php71

sudo cp /usr/local/opt/php71/*.plist /Library/LaunchDaemons/
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.php71.plist

# Link tmux config to the right place        
ln -s .tmux.conf ~/config/.tmux.conf

## Fish
# Because Fish is amazing
echo You will need to add:
echo   /usr/local/bin/fish
echo to /etc/shells.
echo Then run:
echo   chsh -s /usr/local/bin/fish
echo to make fish your default shell.


if [[ "$OS" = "CentOs" ]] ; then
	echo "Nothing yet :("

# Set editor in fish to nano

set -U EDITOR nano

get oh my fish

curl -L https://get.oh-my.fish | fish   
2017/10/04 12:03

More Books

ISBN numbers to sort:

  1. 0-7498-5228-3
  2. 0-19-916501-7
  3. 978-1-84773-621-5
  4. 0-7459-3965-1
  5. 1-84121-602-x
  6. 0-439-96844-5
  7. 978-0-6035-7006-3
  8. 0-14-050296-3
2017/10/03 10:28

New Home for Frigg and other 3D printed stuff

Weather Station start
Calibration bits
2017/10/02 16:19

Another Duplo Locamotive

I picked up this non working Duplo loco, this one is a “LEGO Loco Base Engine 4 x 8 x 5 (54741 / 99844)” it is the same physical size as the others.

To get in:

Load testing
2017/09/24 18:50

Skippy starts to use tmux


# if run as "tmux attach", create a session if one does not already exist
new-session -n $HOST

If you run tmux attach and there is a session, then it will attach to that session (whether it's already attached or not). If there is not a session already then it will create one for you.

key bindings:

  1. Log into machine.
  2. Run “tmux”
  3. ^a,c == creates new window
  4. ^a,a == switches to previously accessed window
  5. ^a,0 == switches to screen number 0
  6. ^a,8 == switches to screen number 8
  7. ^a,d == detaches from current session
  8. ^a,“ == gives a listing of windows for the session
  9. ^a,<esc> == copy mode (which also lets you utilize your tmux scrollback buffer); use vi-keys to navigate
2017/09/19 16:36

Self deploying R-Pi

I normally use Rasbian as my distro of choice for Raspberry Pi, however I find the install process sucks a little too much for my taste, and got to wondering about auto deployment and recovery mode.

It turns out that NOOBS (New Out Of the Box Software) will give ma frame work for most of what I want to do. Downloading NOOBS full latest and Raspbian Lite latest to my mac, we have everything we need to get started with.

  1. First we unzip NOOBS_v2_4_4.zip and 2017-09-07-raspbian-stretch-lite.zip into a folder2), this leaves us with a folder called NOOBS_v2_4_4 and an iso called 2017-09-07-raspbian-stretch-lite.iso
  2. In the NOOBS folder, we want to navigate to the os subfolder, I don't care about LibreELEC, so shall just delete both of them now, this leaves just a folder called Raspbian.
  3. At the same level as Rasbian, I make a folder called Raspbian_lite which is where we are going to place all the files from the iso we downloaded, and some others.
  4. Copy all the files and sub folders; other than boot.tar.xz, and root.tar.xz from the Raspbian folder, to your Raspbian_lite folder
  5. in your new copy of these files we will want to make some changes
    1. os.json will want to

see - https://github.com/raspberrypi/noobs

noobs lite latest - https://downloads.raspberrypi.org/NOOBS_lite_latest

2017/09/17 05:23

Git Sync

You may have noticed that there are lots of posts and pages around here with random names, some of which break when you click on them, Well I am slowly importing them from my old WordPress skippy.org.uk site to this Dokuwiki one, however that means lots of syncing.

Since DokuWiki Settings I have been looking for a better way to sync my blog from here to there and back again… now still using Dropbox to deal with the annoying part for the moment, I tried Unison…

and after a few days I gave up trying to kick Unison into working for me as a two way sync; while I understand that it works for some people, I can only seem to get it to push changes made on my mac to my server; the first file that I write on my server and want to sync back causes it to get very very upset :( and complain about different versions, despite HomeBrew and Ubuntu having the same version of Unison.

So lets try git?

I want to like git, but its a bit of a pain, its not intuitive, it moans a lot about 'merges' and don't even ask about how long it remembers stuff for.

On Server to create a bare repository (fundamentally just the .git folder), stuff on the server is in the path /mnt/archive/hostdata/philip/ (the user skippy and www-data both have full access to this folder) so that is why that appears every so often. I have called my bare git folder skippy_org_uk.git you don't have to add the .git bit, or even use the same name, I just want to tell at a glance what it is.

mkdir skippy_org_uk.git
cd skippy_org_uk.git/
git init --bare

This returns the message Initialised empty Git repository in /mnt/archive/hostdata/philip/skippy_org_uk.git/ so its all looking gravy :)

Now I want to make the folder that I am going to do the stuff in (and tell Apache about):

cd ..
git clone skippy_org_uk.git/

It will give you the following output, warning you that you have now got an empty repository in skippy_org_uk, this is what we were expecting, so don't worry.

Cloning into 'skippy_org_uk'...
warning: You appear to have cloned an empty repository.

Now the entire point of this, being able to sync stuff!

On my laptop I head for ~/Sites and run the following command

git clone ssh://[email protected]/mnt/archive/hostdata/philip/skippy_org_uk.git

again it warns about empty repository, but again we are expecting this :)

At this point we want to copy some files into the new ~/Sites/skippy.org.uk/ folder and then push them to the server, however to try and keep our sanity for at least 15 seconds longer, we want to make a .gitignore file; mine is as follows:



Now we can git add -A the git ignore file, then git commit -m “Added .gitignore” to get that saved, and now we can move all the dokuwiki files into the ~/Sites/skippy_org_uk/ folder on my mac.

Enter push.sh

Because I don't care about commit messages, and am more interested in just keeping stuff up to date, I have written the following script to automate a add, commit, pull then push:


# Add everything
git add -A

# display status (nice to see its working)
git status

# Commit all changes with a UN-helpful message
git commit -m "Added stuff using push.sh"

# Pull before anything else (because the other way madness lies)
git pull

# Push our changes
git push origin master

echo Done.
And how long does it remember for?

Oh god, literally everything is remembered, forever. and if you want to know how big your git repository is in terms of items you can use git gc if you want to know in terms of file size on the disk du -h -d1 will tell you how big the folders are3).

Magic Random Thought!

If you got this far, you will probably also think this is pure magic!

git clone ssh://[email protected]:12345/Users/Skippy/Sites/skippy_org_uk.git
2017/09/11 13:28

Bollington Folk And Boat Weekend

Yesterday (Saturday) Tas, MiniBoyGeek, and I went to Bollington Folk and Boat weekend (website), and I took some photos:

Amy and James of mbWillow have moved up north to work with Brian and Ann-Marie of wbAlton at Bollington Wharf Marina.

2017/09/10 15:05


210 × 297 millimeters or 8.27 × 11.69 inches
Versions may differ
using df -h we can see how much free space we have on all our disks