Git, FTP and Cygwin

So I’ve been trying to get to grips with scripting for git to allow me to commit then deploy via FTP on Windows. I discovered git-ftp which looked promising but it was Linux flavoured, I followed the rabbit hole all the way to installing Cygwin and attempting to build it for Windows before realising I could just use PowerShell with Posh-Git and PSFTP (PowerShell FTP) instead. More to follow on that in the next post however though I’d share a few things I learnt about Cygwin first, no point in my learnings going to waste, this post is mostly a link dump.

Git-FTP can be found here and information regarding installing packages into Cygwin can be found at the source and there is a packpage manager, apt-cyg, that I never tried but looked useful.

A few issues I hit were that I sit behind a proxy at work so following this guide to configure Cygwin to have internet access.  The guide works for http access and if you need https access, just used this command;

export https_proxy=https://user:pass@host:port/

To access my existing git folder which sits in my Documents folder I mounted my C: drive in Cygwin then created a symbolic link;

mkdir /c
mount c: /c
cd ~
ln -s /c/Users/Username/Documents

This creates a folder named Documents in your home folder which maps to your Documents folder in your Windows user folder.  I found this in a cheat sheet on a Stanford users site, very useful so my thanks to them.

All fun learning, more info on my PowerShell solution in the next post.

GeoJSON and PowerShell

I’m working a lot with GeoServer at the minute and needed to get a start and end date for data available in a layer, I don’t have direct access to the backend so thought I’d have a go at using PowerShell to get what I need. PowerShell 3.0 onward has ConvertFrom-Json and Invoke-WebRequest so it turned out to be rather simple;

$array = @()
$json = Invoke-WebRequest -Uri "" | ConvertFrom-Json
$json.features | ForEach-Object { $array += $ }
$array = $array | Sort-Object
Write-Host "Start: " + $array[0] + ", End: " + $array[$array.Length - 1]

This code creates an empty array, invokes a webrequest to get the JSON from the specified layer, pushes the time property from each feature into the empty array then sorts it. Outputting the first and last element in the array gives start and end.

No doubt there is a max/min function I could have used that I’m not aware of so feel free to mention it in the comments if so. It all turned out to be surprisingly easy and I should be writing a similar block of code in JavaScript soon so will post it as comparison.

TaW: Calling Time

The thing a week challenge was a noble one and though I’ve not blogged about a thing a week I’ve certainly not stopped making things, doubly so in my new job in which I build cool things for a living though more on that when I’m allowed to talk about it… Of the random things I’ve made I’ve not documented a lot of them so can’t write them up here and to be honest the blogging part of it stopped being fun. It took a fun challenge of making something and made a chore of it so for that reason I’m going to call the challenge done with mixed results. This way I can carry on making things and don’t have the stressful overhead of documentation, other than for the really cool stuff.

When a hobby becomes a chore, you change the way you do it or you change hobbies. I choose the former as life is what you make it and I intend making to be fun.

TaW: 20 – When Cosplayers Attack…

The tripod strap I made in the previous post was when I was en route to London Film and Comicon to film the first video for our new webseries, The Series of Wonderful Nonsense.  I think it came out well, two days online and we’re over a thousand views already!  The facebook page is online though all but empty at the minute, should be up and running along with the site before too long.


SSHFS From Windows to Ubuntu

SSHFS is a file system that works over SSH, this allows for a secure connection to remote file systems and in my case will allow me to use the Windows based tools I’m familiar with against files on a remote Linux machine.  I’m planning on getting to grips with Linux but it’s daft not to use the tools you know and this will likely prove very useful with the Raspberry Pi too.

The best method of using SSHFS with Windows I’ve found is outlined here, I’ve not tried with anything but a password yet but I’ve now mounted the disk of a user I have in a virtual Ubuntu server I’m running on my laptop.  Seems to work a treat though not tried it over the network yet, with an upcoming move from Home Server to Ubuntu at home soon that will be likely be heavily tested.

New Job!

Things have been a bit manic since the last post, both in job hunting and random other things that have made the last few weeks disappear, including the inaugural Reading Hackspace Hackathon at Horniman Gardens!

The most important part is the job hunt, which was both successful and massive successful.  The repetition is entirely justified as I appear to have landed a job in the space industry!  I started work at the Satellite Applications Catapult as a Software Engineer a few days ago, I’m still getting to grips with the culture of the company but as the place has the feel of a hackspace I can’t imagine that will take long.  Hopefully with time I’ll have projects to share, a lot of what I’ll be working on will be open source, in the mean time I’m enjoying the challenge of learning new technologies as this role will involve a lot more focus on Linux as a development platform.  Not a bad thing as it’s something I’ve wanted more experience with anyhow as I’ve always felt I’ve been missing out and it means Raspberry Pi projects are a go!

SatApps also has a hackathon coming up in October which looks to be very interesting, well worth checking out.

Interesting times indeed!

TaW: 18 – Engine Trolley

A quick thing this week, a trolley to hold a currently stationary engine in my garage.  With an old pallet I got from my old job and some cheap, yet 200KG capable, caster wheels from eBay it’s a cheap solution to making space in the garage more manageable.

Engine Trolley

Also, this is the first post to despite the banner.  Old links to will still work and I’m going to set up IIS URL rewrite tomorrow to handle mapping properly as well as unveiling the new logo.  A full how to guide will be the next Thing.


On The Topic of Redundancy and Hackspaces

As is a risk working for a small company, I was made redundant last week when the company decided on a change of direction. Not ideal but I’ve a good skill set and live in a tech rich area of the country, finding a new job should be a case of when rather than if, though likely I’ve jinxed it now…

The thing is that I now have “mandated free time” while looking for a new job, a long list of unfinished projects and full membership to the local Hackspace. A plan forms;

I’ve decided not to sit idle and instead to use this time, between job hunting, to learn and develop skills for personal projects that have been allowed to atrophy as well as keeping my professional skills sharp. This includes soldering, welding, electronics, photo/video editing and the brains for my Mini digital dashboard project. I’ll also be helping with any remaining works at the Hackspace itself, seems daft not to help out while I’ve time to do so.

Stay tuned for more on this as it happens as well as the redesign and migration.