How I use social media

I started this as a bit of an FAQ for strangers who try and get me to connect with them on Linkedin, or who want to post guest content on my blog, but I thought it was actually worth putting together something that articulates who I choose to follow and interact with on social media, and what criteria I use to make decisions around this sort of thing.

First things first, I have a number of communication channels that I use regularly. I have a public blog and Twitter account, locked Facebook and Google+ accounts, and two email accounts (one for work, one for everything else). I also have Linkedin profile that I largely use for tracking my professional network, and writing nice things about people I know who are engaged in job hunting, but that I don’t really use for communication as such.

I’ll start with my public social media. I’ve maintained a blog for the best part of 10 years, and anyone is welcome to read it, subscribe to email alerts, read it through an RSS reader, or consume it in any other way. What you won’t be able to do is leave comments (I turned those off years ago), or write content for my blog (because it’s mine and it’s part of my public internet presence so I want it to reflect me).

My Twitter account is also public, and I’m not choosy about who follows it, but I’ll generally only follow people back if I know them, I’m interested in the sort of content they post, or I’m interested in having actual conversations with them over social media (Twitter mentions and DMs are the only synchronous online conversations I regularly engage in). I will initiate connections, and often follow accounts that look unloved in the hope that I can help people I like see the wonders of Twitter (and thus talk to them more). I also cross-post to Twitter every time I write a blog post, and am happy to engage with people about the content of the blog post via Twitter. Twitter is also where to look for music recommendations, random snippets of life, occasional banter, and sporadic requests for social contact. It’s also the one place I’ll still post when I’m neglecting everything else (140 characters helps with this).

I suppose Linkedin classes as public social media too, although I use it in a very different way. I occasionally cross-post work-related content from Twitter, but I mainly maintain it to track my professional network, endorse and recommend people I know, and to do anything else I can think of to help other people with their job hunting and career progression. I’ll connect with anyone I’ve ever known professionally, anyone I know personally whose area of interest overlaps mine (so people who work in Universities, or are interested in psychology or personality, or work in IT, or are involved in any sort of people, project or service management), and anyone I don’t know who looks like they might be a useful addition to my professional network (although I never initiate these connections). I’m a lot pickier about people in recruitment and sales, especially if I don’t know them. I also tend not to initiate connections with people who are direct reports or where I am perceived to be more powerful than them in an organisation (although I’ll happily reciprocate invitations if they come in). That’s not a hard and fast rule though – it very much depends what sort of personal connection I’ve already got with the person. I’m also quite sporadic with using Linkedin, and have not done any endorsements for about 3 months (I need to fix that soon).

I use Google+ to communicate with a specific (fairly large) group of people I’ve known for ages. Most of the friendships predate G+, and have followed me through the IRC, Livejournal, Facebook, and Buzz days, and I suspect anyone else would regard my account as being unused, as all my content is locked. I initiate G+ connections a lot, and check the site several times a day (although I have email notifications turned off globally), and while I’ll accept requests from anyone I know, I don’t promise to post anything too interesting.

I’ve used Facebook for a long time, but these days I only really cross-post from Twitter, comment on what other people post, or use it to organise my social life with groups of people who don’t use G+ or Twitter. My friends list is a weird mix of family, friends, colleagues, and people I’ve not seen for years. I’ll generally accept requests from anyone I know (including people I know through work), although I’m fairly bad at initiating requests unless I’ve identified someone who I want to connect with and it looks like Facebook is the only option. I also have notifications turned off, and rarely use the IM function, so it’s not the best method if you need a quick response (weirdly, that’s probably still email).

I like email a lot (if you really don’t have my address then it’s somewhere on this site I’m sure). I try and maintain inbox zero, although I am quite discerning about what I’ll reply to (I get a lot of email), and a lot of what I get actually gets converted to a Trello card if it requires me to do something that takes longer than about five minutes. Before there was social media I used email a lot for socialising – now I find that doesn’t happen unless I know the person really well or the topic of conversation is confidential, but I’m not against using email for social contact if that’s what someone is most comfortable with.

One day I’ll sit down and consolidate my social networks so that they represent everyone I know (for someone with such a clear preference for introversion I know a lot of people), but that day is not today, and I suspect that it’s a job I’ll not get round to for a long time. In the meantime I hope this blog post gives people an idea of what they can expect if they choose to engage with me on social media.

Building the Debian Handbook

What follows is instructions for creating a local HTML copy of the Debian Administrator’s Handbook (which is a very useful source of information for anyone working with any Debian derivative including Ubuntu and Raspian). All work related to this project was done on a Raspberry Pi Zero running Raspian, so I suspect it will work on anything running any Debian derivative (although Ubuntu 16.04 is the only other system I’ve tested this on so far).

Open up a terminal, and issue the following commands to get hold of the source code:

sudo apt install git
sudo git clone
git://anonscm.debian.org/debian-handbook/debian-handbook.git

Install the packages required for building:

sudo apt install publican publican-debian

Build the html files:

cd debian-handbook/
sudo ./build/build-html

It might take a while to build, especially on the sort of hardware I’ve been using. This might be the point to make a cup of tea.

Copy the HTML files into the root of your web server:

sudo cp -R publish/en-US/Debian/8/html/debian-handbook/ /var/www/html/

At this point you should be able to browse to the home page of the directory by navigating to the hostname or IP address of your web server.

Simple CCTV setup using a Raspberry Pi

This weekend I’ve been setting up my latest Raspberry Pi (a version III, in a blue lego case, running Ubuntu) to display a video stream of what’s going on outside my house so I can watch out for deliveries etc.

It’s something I’ve done before on different hardware, but I thought it was worth documenting as it’s a good project for any model of Raspberry Pi, and requires nothing more than the Pi, a USB webcam (or camera module), and 15 minutes of your time. I’m using a piece of software called motion which is available in the Debian/Raspian/Ubuntu repositories.

Install motion:

sudo apt-get install motion

Enable motion to start at boot:

sudo nano /etc/default/motion

Find the line that says start_motion_daemon=no and change it to start_motion_daemon=yes.

Enable the stream to be viewed from other computers on the local network, and also make the output a little bigger:

sudo nano /etc/motion/motion.conf

Change the following values:

daemon on    
width 640     
height 480     
framerate 100     
stream_localhost off    

Reboot, and then browse to port 8081 on the computer you’ve set it up on.

Making professional presentations

Over the last couple of weeks I’ve been writing a presentation that I have to give as part of my ILM5 qualification. I give presentations fairly regularly (in fact I’ve given two since I started writing this one), but this one is different in that I’m being assessed on every aspect of it, and the assessment criteria is fairly specific.

As part of this process I attended a one day workshop covering all the key aspects of presentation skills, and also giving us the opportunity to practice standing up and talking in front of other people who then provided feedback. I found this useful, and none of the feedback I received was a surprise. I think the only thing I could look to change related to delivery of presentations is the amount I move while I’m presenting, but I suspect I’m not going to be able to move less without feeling really self conscious and detracting from the quality of the presentation – I’m certainly willing to give it a try though.

We didn’t have to create slides as part of the training, but the other piece of feedback I generally get is around my slides, and specifically how they don’t contain a great deal of text and therefore often require further information to make sense to anyone who wasn’t actually at the presentation. I’ve not changed the style of my slides as result of this, but I have worked on ensuring they flow in a sensible chronological order, and I’ve also prepared a longer slide set that intersperses the slides I’ll be showing with slides containing what I’ll actually be saying. Hopefully this version of the presentation will be useful as a handout, and will add context to the slides I’ll be showing (which are largely diagrams, graphs and charts). I’m a big believer that slides should enhance a talk rather than acting as a script, and I’d much rather the audience were listening to what I say rather than reading it off a screen.

Over the years I’ve experimented with a few different ways of creating slides, although in recent years I’ve either presented from a PDF file or created them straight in Keynote (for more complex presentations). This time I ended up doing a bit of both, as I wanted to create the slides/notes as markdown files, but also wanted to take advantage of Keynote’s presentation mode. I created my slides as a markdown file, and converted them to a PDF using Pandoc and Beamer (the process is detailed here), and then I used a tool called PDF to Keynote to convert them. I prefer working in markdown because it allows me to convert the same file to a Word document, PDF, ebook and presentation, but it means I have to go through as couple of extra layers of processing to be able to present from Powerpoint. I’ve made sure I can do that this time, although it’s not usually something I’ll bother with, especially if I’m the only person presenting.

My plan is to present from my laptop in Keynote and to use my phone as a remote (or just to use the trackpad of the laptop as it’s a fairly small room). Mitigations for technical difficulties include PDF, Keynote and Powerpoint versions on a USB device and in Dropbox, a second laptop in my bag, and adaptors to allow me to connect either my phone or iPad to the projector and present from that (I had to do that once when my laptop decided to reboot just as I was about to present). I’ll also have the source markdown with me so I have the ability to create slides on the fly should I need to. A lot of this may be overkill, but I’d rather be prepared.

An updated guide to using Pandoc for document conversion

I wrote about Pandoc last year, but I’m using it more and more and I’ve found myself editing the original post a fair few times. This is the updated 2016 version that gathers together useful commands I’ve learned so far.

Last year I found myself needing to do a lot of document conversion, and maintaining documentation that needs to be available in a variety of formats (HTML, Word documents, Markdown and PDF). My tool of choice for this sort of thing is Pandoc, which is available for Windows, Mac OS X and Linux, although most of my usage so far has been on Linux and Mac OS X (it’s a command line package that can output to Dropbox, so it doesn’t matter where it runs really).

There are instructions for installing Pandoc on quite a few platforms. I’ve found that following these is generally enough, although it’s worth installing the latest version of the .deb packages rather than the one in the repositories.

On Debian/Ubuntu I also add the texlive-latex-extra package, but that’s largely because it gives me a specific Beamer theme I like to use.

If you’re using Pandoc on Mac OS X there is one more command you’ll need to issue prior to the first time you want to create a PDF file:

sudo ln -s /Library/TeX/texbin/pdflatex /usr/local/bin/

This will ensure Pandoc knows where to find pdflatex. If this step isn’t followed then you’ll likely get an error message along the lines of pandoc: pdflatex not found. pdflatex is needed for pdf output.

Pandoc works for me because I write everything in markdown, and Pandoc is great at taking markdown and converting it into almost anything else. It’s also good if you need to create a PDF, a Word document and a slide show from the same document. The syntax is fairly simple for most document types:

For example:

pandoc input.md -s -o output.docx
pandoc input.md -s -o output.html
pandoc input.md -s -o output.epub

Conversion to PDF works the same, although I’m not a fan of wide margins, so I tweak it slightly:

pandoc -V geometry:margin=1in input.md -s -o output.pdf

For a Beamer slide show you’ll need something like:

pandoc -t beamer input.md -V theme:metropolis -o output.pdf

Pandoc does a lot more, but the documentation is great, and the commands above should be enough to get you started. If you want to try out the functionality in a web browser then http://pandoc.org/try/ should be able to handle most types of conversions.

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

Navigate to /var/www and issue the following command:

sudo chown -R www-data html

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.


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.

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.

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.