March 29, 2019
Embiggen .desktop loaded applications on Ubuntu
I keep forgetting the steps required for this, so thought I should write them up in one easy to remember blog post for myself.
My desktop set-up consists of 2 x 1080 and 1 x 4k display. Making sure that applications are readable is a bit of a farce.
But as long as I ensure that certain applications only ever appear on the correct monitor, means that I can alter the launcher to set the correct DPI scaling.
read more
June 12, 2018
apt-upgrade
I used to use a 2 command 1 liner to update my system:
sudo apt-get update && sudo apt-get dist-upgrade That was easy enough to type out now and then. But over time it grew to include removing and cleaning downloaded packages as well.
Then there’s the matter of knowing if an update requires a system restart.
The lazy me put it all into one bash script and made it globally accessible and executable:
read more
June 4, 2018
Most amusing spam received to date
Good morning…
Do not consider on my English, I am from Iran.I installed the virus on your system.After that I pilfered all confidential info from your OS. Furthermore I received some more compromising evidence.The most interesting evidence which I thieftend- its a record with your self-abusing.I adjusted malicious software on a porn web site and after you installed it. As soon as you picked the video and pressed play, my software immediately set up on your OS.
read more
February 23, 2018
Unable to install sass gem on CentOS 6.9 with Ruby 2.4
Something changed recently, preventing a VM from fully provisioning. Tracking it down was a bit of a PiTA.
OS: CentOS 6.9
Ruby: 2.4 - installed from source with the gearlingguy.ruby ansible role
Gems to be installed: sass
Output of attempting to install the sass ruby gem:
$ sudo gem install sass
Fetching: rb-fsevent-0.10.2.gem (100%)
Successfully installed rb-fsevent-0.10.2
Fetching: ffi-1.9.21.gem (100%)
Building native extensions. This could take a while...
ERROR: Error installing sass:
ERROR: Failed to build gem native extension.
read more
November 25, 2017
Setting up an On-Premise instance of Amon
NewRelic no longer offers server monitoring for free accounts, so what are the alternatives when you’re on a skin-flint budget?
There are lots, but I’m not going to review any of them. Instead, I’ve been tasked with getting Amon running on a DigitalOcean droplet so that it might be appraised.
Amon can either be used as a SAAS, hosted by Amon themselves. Or it can be run “On-Premise” by cloning the git repo to your own server.
read more
August 16, 2017
Upgrading Jenkins war file the quick and dirty way
jenkins-update.sh:
#!/bin/bash set -e if [ $# -eq 0 ]; then echo "New Jenkins version number missing" exit 1 fi VERSION=${1} set -x cd /usr/share/jenkins/ wget http://updates.jenkins-ci.org/download/war/${VERSION}/jenkins.war -O jenkins.war-${VERSION} rm jenkins.war && ln -s jenkins.war-${VERSION} jenkins.war service jenkins restart The above bash script will download a given version of the jenkins.war file and symlink it into place before restarting the jenkins service.
Assumptions made:
The jenkins.war file is installed to /usr/share/jenkins The server is using upstart for running services User input is sane - there is no validation or sanitisation Comments Matthew Morton says: 27th October 2017 at 10:24 pm
read more
May 7, 2016
Vagrant: sudo access and the hostsupdater plugin
Bringing up a vagrant machine is as easy as vagrant up.
If you’re a web developer, it would be nice if it were to add the private network IP address to /etc/hosts of the host machine. Thus giving you instant access to http://my-awesome-site.dev/
This doesn’t happen by default, but it is possible with the use of a plugin. The one I like to use is vagrant-hostsupdater.
Install thus:
vagrant plugin install vagrant-hostsupdater When you bring up the vagrant machine, it will now automatically add the VM’s name to /etc/hosts.
read more
June 6, 2015
Basic set-up of a 3com 4500 managed network switch
I’m a PHP developer by trade with a strong Linux background. One thing that has been lacking from my skill set is how networking really works.
In an effort to rectify this, I bought myself a 2nd hand managed network switch from ebay. A 26 port (24 x 10/100mb + 2 x 1gb) “3com SuperStack 3 Switch 4500”.
Flashing lights and noisy fans, I feel like I’m headed in the right direction.
read more
April 27, 2015
Vagrant hostsupdater plugin without having to enter your sudo password
Vagrant - Great
Hosts Updater plugin - very handy
Having to enter your sudo password when the plugin edits your hosts file - really annoying.
I finally got around to addressing this on my dev system. Looking at the plugin source there are two sudo commands that we need to cater for. One to add hosts and one to remove.
Adding the following to my sudoers file worked a treat:
read more
February 17, 2013
Multi-screen with Ubuntu Unity
This tweet has to have been the most popular thing I have ever said. At time of posting it has gained 80 retweets, 25 favourites and many replies/questions.
Work recently bought me a new workstation, so the 1st thing I always do is to dual boot with Ubuntu.
Some might consider me an edge case user. Though as a developer, I like a rather particular set-up. That is, 3 wide screen monitors with the central one rotated 90 degrees for my IDE.
read more