New Music – May 2016

I was at home a lot this month, using up holiday I needed to take, and also doing a lot of de-cluttering and technical projects around the house. I did listen to a fair bit of new music (as detailed below), but I also ripped around 100 old CDs to my computer, and so much of my fortnight off was sound-tracked by music from the 90s and very early 2000s, which I’d not listened to for the best part of 10 years.

May also saw the unexpected release of the new Radiohead album. I’ve played it a lot, I love it, and I’d highly recommend it to anyone. Also of note was the Rough Trade album of the month by LUH. The music is great, but it’s also the sort of record that you want to just look at – it’s full of interesting artwork, and the sleeve itself is a work of art.

I’d also highly recommend the New Order record. It’s extended versions of last year’s album, but it comes with a download code for the original album so you get a great deal of wonderful music for £9.99. Of course, that means I now have another download code for Music Complete.

I also love the new Car Seat Headrest record. If you’re intrigued then there are a few very good albums available from Bandcamp on a pay-what-you-want basis. I’d recommend How to Leave Town as a representative starting point.

My list for May is:

Radiohead – A Moon Shaped Pool
LUH – Spiritual Songs for Lovers to Sing
James Blake – The Colour in Anything
Julianna Barwick – Will
Cate le Bon – Crab Days
New Order Complete Music (extended versions from last year’s Music Complete)
Drake – Views
Cat Seat Headrest – Teens of Denial
Super Furry Animals – Bing Bong(single_)

Setting up WordPress

The following instructions describe how I install WordPress on Ubuntu. The instructions may differ slightly for other server environments, but the basic principles should be the same. This requires shell access to the server, but once it’s finished the WordPress instance(s) should be capable of being administered through a web browser.

Part 1 – Installing WordPress

Download WordPress and move it to /var/www/html/ so it runs from the root directory of the web server.

cd /var/www/html
sudo apt-get install unzip
sudo wget http://wordpress.org/latest.zip
sudo unzip latest.zip
cd wordpress
sudo mv * /var/www/html/
cd /var/www/html
sudo mv index.html index.html_old

Log into mysql:

mysql -u root -p

Create a new database (calling it something different to the example below)

mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO wp_user@localhost IDENTIFIED BY "<password>";
mysql> exit

Install WordPress, following the instructions at http://codex.wordpress.org/Installing_WordPress. Remember to make a note of the username and password you set up for the admin account.

At one point in the installation (it will be obvious) you may need to issue the following command to manually create a config file.

sudo nano wp-config.php

Once WordPress is installed, navigate to /var/www (cd .. or cd /var/www/) and issue the following command:

sudo chown -R www-data html

This will ensure you can install plugins and themes through the WordPress web interface.


Part 2 – Configuring WordPress

Log in using the account you just created.

Install and activate some plugins (Acunetix WP Security, Jetpack by WordPress.com, WP-Markdown and WordPress Importer), via the web interface in WordPress (if you’ve not issued the command above then this won’t work).

Navigate to the left hand menu item for Acunetix WP Security, tick all boxes and click on “update settings”. This will apply all recommended security changes.

Use WordPress Importer to import content (posts, tags, files) from other instances of WordPress.

If you want to compose posts in markdown then you’ll need to navigate to Settings –> Writing and tick the boxes for the interfaces you want to default to markdown.

Note: you won’t be able to activate Jetpack unless the server is visible on the public internet.

Remove the “Hello World!” post and the sample page (both should be obvious if they have not been removed!)


Part 3 – WordPress Multisite (optional)

This allows you to run more than one blog/site in a single instance of WordPress. The instructions at http://codex.wordpress.org/Create_A_Network are good, and are mostly enough to get it up and running.

There are two more things to do on Ubuntu servers:

Enable mod_rewrite

 a2enmod rewrite

Open /etc/apache2/apache2.conf and find the part that says:

 <Directory /var/www/>
 Options Indexes FollowSymLinks
 AllowOverride None
 Require all granted
 </Directory>

Replace AllowOverride None with AllowOverride All


Part 4 – SSL (optional)

Enable mod_rewrite (if you’ve not already done it as part of step 3)

sudo a2enmod rewrite

Enable ssl

sudo a2enmod ssl
sudo a2ensite default-ssl.conf

Amend your apache config to enable pages to be served on port 443

sudo nano /etc/apache2/sites-available/default-ssl.conf

<VirtualHost _default_:443>
Servername yourdomain.com
DocumentRoot /var/www/html

#Enable/Disable SSL for this virtual host.
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3

Amend 80 config (e.g. 000-default.conf), to redirect to 443

sudo nano /etc/apache2/sites-available/000-default.conf

DocumentRoot /var/www/html
ServerName yourdomain.com
Redirect "/" "https://yourdomain.com"

Restart apache

sudo service apache2 restart

Change domain in WordPress settings (through UI) to yourdomain.com

Create a certificate request (csr):

sudo mkdir /etc/apache2/ssl
sudo openssl req -new -newkey rsa:2048 -nodes -keyout /etc/apache2/ssl/yourdomain.key -out /etc/apache2/ssl/yourdomain.csr

Country Name (2 letter code) [XX]:GB
State or Province Name (full name) []:West Midlands
Locality Name (eg, city) [Default City]:Your city
Organization Name (eg, company) [Default Company Ltd]:Your Company
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:yourdomain.com

Copy certificate somewhere sensible

sudo cp /etc/apache2/ssl/yourdomain.csr /home/username/yourdomain.csr

What you’ll need to do then is grab the certificate from home directory, save it somewhere safe and then do whatever you do in your organisation/environment to generate/buy/get a root certificate (there are so many different ways).

Once you have a root certificate, follow instructions at http://askubuntu.com/questions/73287/how-do-i-install-a-root-certificate

Configure apache to use certificate

sudo nano /etc/apache2/sites-available/default-ssl.conf

Then add/edit the following lines:

SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
SSLCertificateFile  /etc/apache2/ssl/yourdomain.com.cer
SSLCertificateKeyFile /etc/apache2/ssl/yourdomain.key

Restart apache

sudo service apache2 restart

At that point your site should serve web pages on https with no error messages.

What I did on my holidays

I’m quite pleased with what I’ve achieved over the last two weeks. This holiday was supposed to be a chance to recharge prior to a very busy period at work, but I think I’ve actually been about as productive as I normally am (just in different ways).

I’ve done a lot of technical things while I’ve been off, including dismantling (and throwing away) 5 old computers, building a server/workstation using a lot of spare parts and a new case/motherboard, and setting up WordPress Multisite on the new server (and then building a site to host my Continuous Professional Development Portfolio which I have to do as part of ILM5). I’ve also decluttered my study, set up a new Raspberry Pi Zero, written a lot of notes about fixing specific technical issues I’ve encountered whilst doing all these things, and ripped about 100 CDs to MP3.

The decluttering has felt very liberating, and I plan on doing more of it (and throwing out more computers) in the summer. Of course, all this means is that I have an even larger pile of old hard drives and memory (even after using 3 of each in the new server) that I need to dispose of at some point.

As well as technical things I’ve also visited the Sea Life Centre, been out for two meals, and booked tickets for various shows. I’ve certainly spent a lot less money than a two week holiday abroad would have cost, and I’m feeling like my technology setup is moving in the right direction again.

WordPress troubleshooting

I’ve done a fair bit of WordPress troubleshooting over the last few weeks, including moving sites from one server to another and upgrading server operating systems. While a lot of this isn’t probably that interesting, I did come across a few things that might help other people undertaking similar tasks.

My method for moving content between sites generally involves exporting the content to XML, installing a fresh instance of WordPress on the new server, importing the content using the WordPress Importer plugin, and then seeing what doesn’t work. What usually doesn’t work is uploaded images and files, but it’s just a case of copying across the whole contents of /var/www/html/wp-content/uploads to the new server to fix that.

Talking of which, Debian (and derivatives) changed the default location for websites from /var/www to /var/www/html last year. If you upgrade Debian to the latest version and all your WordPress sites break, then it should just be a case of editing /etc/apache2/sites-available/000-default.conf so that the DocumentRoot value is set back to to /var/www/.

My last revelation is around hardwired links. When moving a site to a new server (with a new URL) there are likely to be many references to the old site URL in config files and in the WordPress database. There is a plugin called Search and Replace which does all the heavy lifting for you, and which should rewrite your new URL to everywhere it needs to be. I’ve used this a few times now and it works really well.

I’m also half way through writing up how I install sites from scratch, but that’s going to be quite a lengthy document and probably deserves a separate post.

Setting up new Ubuntu machines

I’ve had to set up a few Ubuntu desktop machines recently (for my own use), and I thought it was worth documenting what I install on each one, and how I automate those installations as much as possible.

Add a script to make updating software easier

Create a new file called updateall

#!/bin/bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get dist-upgrade -y
sudo apt-get clean -y
sudo apt-get autoclean -y
sudo apt-get autoremove -y

Move it to /usr/local/bin/ then make it executable with sudo chmod -X updateall.

Add some software from the Ubuntu repositories

sudo updateall
sudo apt-get install git gimp byobu vlc ubuntu-restricted-extras build-essential hexchat openssh-server unity-tweak-tool youtube-dl

Install Spotify

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

Install atom

cd Downloads
wget https://github.com/atom/atom/releases/download/v1.7.3/atom-amd64.deb
sudo dpkg -i atom-amd64.deb

The version number may be different – get the latest version from https://github.com/atom/atom/releases/.

Install dropbox

wget https://www.dropbox.com/download?dl=packages/ubuntu/dropbox_2015.10.28_amd64.deb
sudo dpkg -i dropbox_2015.10.28_amd64.deb

The version number will be different, but hit tab after typing dropbox and it should autocomplete. If that doesn’t work, download the latest version from https://www.dropbox.com/install?os=lnx.

Install tails-installer

wget --continue http://dl.amnesia.boum.org/tails/stable/tails-i386-2.3/tails-i386-2.3.iso
sudo add-apt-repository ppa:tails-team/tails-installer
sudo apt update
sudo apt install tails-installer

Install pandoc

wget https://github.com/jgm/pandoc/releases/download/1.17.0.2/pandoc-1.17.0.2-1-amd64.deb
sudo dpkg -i pandoc-1.17.0.2-1-amd64.deb
sudo apt-get install texlive

See here for more on how I configure and use Pandoc, and also for a fix for a Mac OS X related bug to do with rendering PDFs.

Cosmetic tweaks

Go to System Settings --> Appearance
Change theme from Ambience –> Radiance
Reduce Launcher size to 24
Change desktop wallpaper
Enable workspaces

Open Unity Tweak Tool and configure so that hot corners work, with the top left and right corner doing a window spread (largely because that’s how my Macs are set up, and also how Gnome 3 works).

Go to System Settings --> Security and Privacy and turn off all “phone home” functionality.

New Music – April 2016

April has been a good month for music. I’ve found plenty to listen to on freezing walks to the train station in the morning, and significantly warmer journeys home. I’ve bought a few records, spent hours listening to Spotify, and yet this list only really scratches the surface of the music that’s been released over the last month. It’s still a long list though, and probably about as much new music as I can reasonably listen to (as opposed to hear) in a month when I’m working every day and doing all the other things I do.

May will be a different kind of month as I’ll be at home more; with a two week break from work and a couple of long weekends. I’m not sure if that will change how I listen to music (or what I listen to), but I know I am very much looking forward to it.

I’m not sure what my favourite record from this list is, although I do have a soft spot for Direction of Travel by She Makes War. I’ve had this record a while, but it was properly released this month and I really hope a lot more people get to hear it. I’m also growing increasingly fond of The Magnetic North’s – Prospect of Skelmersdale which manages to make the town of Skelmersdale sound both beautiful and appealing (somehow).

My list for April is:

Black Mountain – IV
She Makes War – Direction of Travel
Yeasayer – Amen and Goodnight
The Magnetic North – Prospect of Skelmersdale
Mogwai – Atomic
Frightened Rabbit – Painting of a Panic Attack
Kevin Morby – Singing Saw
PJ Harvey – The Hope Six Demolition Project
Rufus Wainwright – Take all my Loves
Edward Sharpe & the Magnetic Zeroes – Person A
Tinpan Orange – Love is a Dog
Face+Heel – Our Prince’s Quarry
Brian Eno – The Ship Guided by Voices – Please be Honest

Managing for efficiency and effectiveness

The latest module of my ILM5 training was called Managing for efficiency and effectiveness. I was a lot more comfortable with this as a subject than budgetary control, and my main learning point was that I was on the right track with a lot of the things I’m already doing, and that the way I organise myself and my time is fairly efficient and effective without me needing to make huge changes to how I work. I found it useful to compare the material in the session to research I’ve already done into Lean IT and Lean Six Sigma, and I’ll be doing further comparison once I’ve gone through Lean Six Sigma Yellow Belt training which starts tomorrow.

The only mildly uncomfortable thing we covered was around feedback, and as part of the assignment I’ve got to ask people I’ve managed, supervised or otherwise lead to feed back on my management style. I wrote some questions yesterday, made them into a questionnaire this morning, and will start sending it out to people tomorrow. I’ve never been particularly comfortable asking for feedback, but it’s something that I think is very important as I think that regardless of how self-aware I might be, I’m always going to have blind spots.

As well as writing an assignment based on this feedback, I’ll also be starting the main phase of my final project, which involves planning and executing a major change in the workplace. The work I’m going to be doing is related to Lean IT, and making the flow of work through a system as efficient as possible by optimising working processes. I’m hoping to start the serious work on this in the next couple of weeks, and will be presenting the results at a talk in June (which I’ll probably repeat a couple of times for my team if all goes well).

Building a media centre with a Raspberry Pi and OpenELEC

My project for the Easter vacation has been to build a media player using a Raspberry Pi and Open ELEC. Setup was fairly straightforward, but I thought it was worth writing up anyway – especially as I’m probably going to make further changes to the setup as I find new features to add.

Hardware

I went with the new Raspberry Pi III, which is plenty powerful enough for this project. I also used a 16Gb SD card (the largest unused one I currently have), and a case that looked like it would handle being jostled around in my bag. The device also requires power and HDMI cables (which I already had), and a keyboard/mouse/monitor/ethernet cable for setup.

Software

OpenELEC is one of the installation options on the NOOBS image, so I simply downloaded that, copied it to the SD card, and installed it from there. It requires a network connection to install, but is a lot easier than having to copy the image using dd. I went with the default options in all cases, although it’s worth noting that if you enabled ssh access then it’s not possible to change the root password at all, so you’ll need to disable it after setup (not that setup, or anything else, requires shell access).

Once installation had finished the device booted into the default Kodi interface. A web-based remote could be accessed by browsing to the device’s IP address, and it could be accessed as network based storage from all of my computers. Then it was simply a case of dropping some media files (movies and music) into the respective folders and testing that content could be played. I copied across some MP3, MP4 and AVI files, all of which played fine.

Addons

The original plan for this project was that I’d end up with something that could play movies and music on my TV, and that could handle storing a small amount of content locally so that when I end up in a hotel room with a few hours to kill I have something interesting to watch. The solution I’ve built ticks all those boxes, but I was curious to explore what else OpenELEC could handle.

After exploring the interface and available software for a little while I found channels for Last.fm scrobbles, BBC iPlayer and TED talks. All of these installed and worked fine. Adding iPlayer started me thinking about other free to view TV channels, and at this point I remembered that the last edition of Linux Format had an article on using a Pi Mini for a similar project, and that there were instructions for adding a whole host of other services. Their instructions for adding ITV player were as follows:

Navigate to System > File Manager. Select ‘Add Source’ followed by ‘’, enter http://www.xunitytalk.me/xfinity and select ‘Done’ followed by ‘OK’. Hit Esc then choose System > Settings > Add-ons > Install from ZIP file. Select xfinity from the list of locations, select ‘XunityTalk_Repository.zip’, hit Enter and wait for it to be installed. Now select ‘Install from repository’ followed by .XunityTalk Repository > Video add-ons, scroll down and select ITV. Choose Install and it should quickly download, install and enable itself.

This worked fine, and also gave me access to a lot of other channels that I could add.

There are a lot of things I’ve not explored on this device yet, but at the time of writing I’ve got BBC and ITV channels (live and catchup), TED talks, and a variety of locally stored media. Music I play scrobbles to Last.fm, and I can drop new media onto the device from my computer. I figure that all I’ll need to travel with is a power cable, a HDMI cable and a small mouse (all of which I already have), and I should be sorted. I also tested a trick I’ve used before which involves sharing a wifi connection via ethernet on my laptop to get the two devices to talk to each other long enough to add/remove media, which might also prove useful.

Software I use

Software I use that I feel is somewhat noteworthy includes:

  • Evernote – I use this on every device I own, mostly to take notes in meetings and training sessions, and then to revise/reflect later. A lot of my notes are now photographs of whiteboards, which Evernote handles very well.
  • Atom – A text editor that handles Markdown well, and can preview and export to PDF. This pretty much handles all of my writing/blogging work within one application. I’m currently writing this post in Atom. I also use Pandoc to convert to PDF, HTML and/or .docx if required.
  • Trello – I’ve just started using this for my to do list, and it’s a good way to visualise the planning and execution of any task based work.
  • Keynote – For presentations. I wouldn’t say I’m a power user, but I can throw together a half decent presentation now.
  • Dropbox – Cloud storage and synching software to ensure I can access everything everywhere.
  • IFTTT and Buffer – To automate as much as possible. Between them they handle a lot of the seemingly clever things in my digital life, and explain why I seem to be able to post to social media sites at times when I appear to be elsewhere.
  • NVivo – As a lot of the data I work with is words rather than numbers this is proving somewhat invaluable. I use the Mac version, but should get round to exploring the Windows version soon as I understand it has some different features.
  • Virtualbox – Because no-one needs as many physical computers as I had before virtualisation was a thing.

I’m always happy to talk about any of this software and how I use it to be productive.

New Music : March 2016

I’ve been very busy with the day job this month, and therefore finding new music has taken a backseat. Most of these were things were chosen/recommended by people who are not me, but I still think it represents a great snapshot of music released in March 2016. The Iggy Pop record in particular is excellent, and I don’t think anyone was expecting him to ever make anything so good again. I’m also very pleased with my Rough Trade album of the month for March, which is the debut album by Unloved. It’s difficult to categorise, but well worth a listen.

Unloved – Guilty of Love
Iggy Pop – Post Pop Depression
Primal Scream – Chaosmosis
Richmond Fontaine – You Can’t Go Back If There’s Nothing To Go Back To
The Range – Potential
Underworld – Barbara, Barbara, We Face An Uncertain Future
Max Richter – Sleep (Remixes)

I now own all but the last three on vinyl after a little splurge this week, and I don’t think I’ve listened to much else this month.