Jamie's Notes

Currently browsing software ⤵

Rendering LIDAR Data

I spent a bit of time this weekend learning how to render LIDAR data into 3D dioramas with Aerialod.

Aerialod is not the most intuitive program, but you can get some nice images out of it with a bit of experimentation.

Time well spent? Probably not. But it was fun.

Lake District

The tools I use

One of my favourite features of Lifehacker is their ‘How I Work’ series of interviews, where they ask people to explain the tools and strategies they use to get shit done.

I spend quite a bit of time thinking about the software that I use and how I use it – definitely more time than is productive, and I find it hard to settle on a system without falling into the productivity porn trap – but nevertheless I’ve managed to put together a list of the software and services that seem to stick around on my devices. All of this stuff works really well, so I’ve got no good reason to spend any more hours looking for a better text editor.

Here it is:

Hardware / OS

  • Microsoft Surface 3 / Ubuntu
  • BlackBerry KeyOne
  • iPad Mini 4

Server Stack

  • Mailcow provides the family with email, calendars, tasks and contact sync across devices. It works brilliantly.
  • Nextcloud provides secure file synchronization between devices.
  • Gogs is a self hosted GIT server, similar to Github. I use it to keep track of bits of code, and even bits of prose.
  • A Mastodon instance provides my social media fix.

All of the above are hosted on Hetzner servers and cost less than a tenner a month to run.

Internet & Communication Tools

  • Browser: Firefox
  • Instant Messenger: Matrix
  • Email: Evolution (desktop) / Mail (iOS)
  • IRC: Hexchat
  • Text Editor: Sublime Text

Applications of Note

  • I use YNAB to manage my daily finances. Four years of use has transformed my understanding of my spending habits, even though I haven’t fully bought in to all of the principles.
  • NewsBlur helps me to keep up to date with the latest posts from sites that I’m interested in. RSS is most definitely, and defiantly, NOT dead.
  • I manage all of my passwords with Bitwarden.
  • Audible and Pocket Casts make my commutes tolerable.
  • Calibre makes managing my ebook collection a breeze.

That’s my list. What’s yours?

Easy public SAMBA shares

I use Samba to share files with my Linux based media servers. It’s a pain in the arse and I hate it. Getting a share on the network is easy but the permissions punch me in the face. I’ll often end up with a share writable by one user but not another, or writable by many users but the files only readable by other users. Last week the whole wobbly system broke down because of a permissions issue and I was forced to figure it out once and for all. Turns out that I was over thinking it, and that it’s actually quote simple. Assuming that Samba is already installed, here’s a simple method for creating a public Samba share:

Step 1: Create the share location

sudo mkdir -p /share/media    
sudo chown root:users /share/media
sudo chmod 2775 /share/media 

Step 2: Add your local user to the ‘users’ group.

sudo adduser <username> users

Step 3: Configure SAMBA

Add the following to the bottom of /etc/samba/smb.conf

comment = Shared Data    
path = /share/media    
browseable = yes    
guest ok = yes    
force group = users    
writeable = yes    
create mask = 0664    
force directory mode = 0775  

Finally, restart Samba to initialise the new configuration.
sudo service smbd restart

You might need to log out and back in again for the permission changes in step 1 to take effect.

Using SSH Keys and Putty to Access Remote Servers

This tutorial assumes that you have a basic level of knowledge of Linux commands and can access a remote system using SSH. You will need PuTTY & PuTTYgen.

Direct links to portable versions of both applications are above, but you can also download a windows installer that has everything that you need from here.

Using PuTTYgen to generate a key pair

Open PuTTYgen and create a new key pair. The on-screen prompts are self explanatory and the defaults will work just fine.

Save a copy of each of the keys. It’s probably wise to password protect your private key so that it can’t be stolen. Keep both keys somewhere safe.

Select all the text in box labeled ‘Public key for pasting into OpenSSH authorized_keys file’ and copy it to the clipboard. The sequence should start with "ssh-rsa".

Preparing your SSH server.

Login to your SSH server. Navigate into your .ssh folder and paste the SSH key into the authorized_keys file. If it isn’t there, create it:

mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0644 ~/.ssh/authorized_keys

You can logout from your server for now.

Preparing PuTTY to login with your private key file.

Fire up PuTTY and enter the host name and port for your SSH server. In the navigation tree on the left, click ‘Data’ and enter the user name that you use to login to your SSH server.

Now click on ‘SSH’ and then ‘Auth’. Click browse and locate the private key file that you generated with PuTTYgen.

Scroll to the top of the navigation tree and click on ‘Session’. In the ‘Saved Sessions’ box, give your session and name and hit Save.

That’s it. Your SSH server and PuTTY are now ready to connect without passwords.

Owncloud & Missing Data

I’ve been using ownCloud for a couple of months. Mostly it works really well but there are times when it isn’t quite as slick as its commercial counterparts.

One of the most disconcerting things that has happened so far was discovering that tens of gigabytes of files had disappeared from my computer. The sync client log said that they had been deleted, which was odd because I definitely didn’t do it. I checked the web interface, hoping that it was a local error, but they were gone from there too. I fired up a terminal, ssh’d into the server and checked my data directory manually. Thankfully of my files were there – but they were in some sort of limbo, not accessible to either the web interface or my local sync client.

Frantic googling showed that I am not the only person that this has happened to. There are a couple of ways to fix it, but the simplest solutions is to force ownCloud to perform a complete scan of your data directory and make the missing files available again. The following command will do just that:

sudo -u www-data php /var/www/owncloud/console.php files:scan --all

You might need to do it a couple of times. The initial scan brought the files back into the web interface, but I had to do it again before they would sync to my laptop.