Delete a Remote Git Tag

Just a note more to myself as I always forget the syntax of this one. To delete a tag both local and remote:

git tag -d tag_name && git push origin :refs/tags/tag_name

Just a note more to myself as I always forget the syntax of this one. To delete a tag both local and remote: git tag -d tag_name && git push origin :refs/tags/tag_name…

Read More

Vagrant + VirtualBox + Update Tools

If you're a Vagrant user that uses Virtualbox to host your machines, sometimes the Virtualbox tools in the guest VM will get out of date. There's a great Vagrant plugin that will run an update for you. Run the following command to install it:

vagrant plugin install vagrant-vbguest

There is a far more detailed description over on this blog post.

If you're a Vagrant user that uses Virtualbox to host your machines, sometimes the Virtualbox tools in the guest VM will get out of date. There's a great Vagrant plugin that will run an update for you. Run the following command to install it: vagrant plugin install vagrant-vbguest There is…

Read More

Travel Tip: Send Google Maps Location to Mobile Device

If you're signed in to your Google account, you can click on a pin then click 'Send to Mobile Device'. This will forward the location over to your device.

Google Maps

Google Maps

If you're signed in to your Google account, you can click on a pin then click 'Send to Mobile Device'. This will forward the location over to your device.…

Read More

Git: Remove Non Project Files from Repository

A quick tip that I always seem to forget, if you need to quickly remove any non project files form a repo, check this Stack Overflow answer out:

http://stackoverflow.com/questions/5037480/removing-non-repository-files-with-git

In short, I think I used this in the end:

git clean -df

Which removed and deleted any files not in the git index.

A quick tip that I always seem to forget, if you need to quickly remove any non project files form a repo, check this Stack Overflow answer out: http://stackoverflow.com/questions/5037480/removing-non-repository-files-with-git In short, I think I used this in the end: git clean -df Which removed and…

Read More

Adding Backups to Your Laravel Project

If you have a Laravel project and need a simple backup solution, I'd recommend Shawn McCool's database-backup. Follow the instructions to get that configured to your liking and you can then cron a task like this:

php artisan db:backup --destinationPath=`hostname`-`date +\%Y-\%m-\%d`.sql --destination=dropbox --database=mysql --compression=gzip

To automatically stick a daily backup to Dropbox or any other filesystem provider supported by Flysystem.

If you have a Laravel project and need a simple backup solution, I'd recommend Shawn McCool's database-backup. Follow the instructions to get that configured to your liking and you can then cron a task like this: php artisan db:backup --destinationPath=`hostname`-`date +\%Y-\%m-\%d`.sql --destination=dropbox…

Read More

Generate Private Keys & CSR for an SSL Cert

Something I always tend to have to Google for the right syntax is generating a CSR for an SSL along with a set of keys for it, this post by Google themselves has a good reference:

Generating keys and CSR - Web Fundamentals

Something I always tend to have to Google for the right syntax is generating a CSR for an SSL along with a set of keys for it, this post by Google themselves has a good reference: Generating keys and CSR - Web Fundamentals…

Read More

Woes of Cloudflare SSL

I recently switched tweekly.fm over to serve as SSL via Cloudflare and for the most part, this has been a good transition for most people. There have been the odd reports of people having issues though. I looked into this a bit more and it comes down to the types of certs stored in some phones and browsers - I don't think they're out of date per-se, but I don't think they support a certain cipher, which is what makes them fail.

There's some good information over on this blog post.

I recently switched tweekly.fm over to serve as SSL via Cloudflare and for the most part, this has been a good transition for most people. There have been the odd reports of people having issues though. I looked into this a bit more and it comes down to the…

Read More

Tweekly.fm Changes

If you’re reading this post, you are most likely a user of Tweekly.fm. I’d like to take a little time to write about the changes that have recently happened on the site.

I’d like to note that I have come across some of the most fantastic people in the world through this humble small service and want to see it continue for a long period of time - but to do that things needed to change.

What is Tweekly.fm?

The main functionality of the site takes data that you have provided via Last.fm and posts it, once per week to social networks.

This in itself sounds like a very simple system that has multiple parts within it. Every day, thousands upon thousands of updates are posted to Facebook and Twitter - which take a lot of time and consume a lot of resources to do so. Previously, Google Ads were ran across the site which generated a low amount of income which didn’t cover the cost of keeping the service up and running. The were unattractive and not a good fit for the service.

Crowdfunding

As most of the regular users who use the service know, I attempted to run a crowd funding programme earlier in the year, which did generate enough money to contribute to the hosting costs and some of the development time in updating the site and services that you use.

While the new site has been built, I took time to decide how the new service should run, what the foundations of the service should be and how this can be attained - without financial impact on me personally. I didn’t want to use Google Ads on the new site and as you can see, they’re not present and won’t be.

Support

The biggest cost besides hosting the service is the amount of time answering support tickets and emails. This gets done in my own free time and outside of my 9-5 job. No service is without bugs or hiccups - but a lot of general questions take time to answer and if you’ve ever emailed I’d like to think you got a response quite quickly.

What’s the cost?

The service runs on Linode using a mixture of servers, which for the most part consisted of:

  • 2 x 2GB Linode ($20x2 + $10x2) - Web servers
  • 2 x 2GB Linode ($20x2 + $10x2) - Queue runners, queue daemons
  • 1 x NodeBalancer (1x$20) - Load Balancer
  • 2 x 4GB ($40x2 + 2x$10 Backups) - Database (Master and Slave)

As you see, this comes in at $240/mo which for a service that doesn’t generate a lot of money, is a costly expense that I’ve been happy to cover for a long time. I should also note that the project has very kindly received hosting from Last.fm directly in the past and in the early years this was absolutely key to the project. For the new site, the requirements are about half of those servers.

External Integrations

The last time consumer is keeping up with the external services that are used. Each time Twitter, Facebook and co update their APIs, I needed to change a lot of in-house code to match. During the development of the new system, everything has been moved over to Laravel 5.1 and a lot of standard libraries have been used in the codebase to improve and minimise the amount of time needed for upkeep.

So, what happens now?

The biggest issue for the service was dealing with the amount of traffic that came back to the site once updates are posted, so the new system has no public facing profile pages at the moment. The only place that people can see your updates are on your social media profiles.

Secondly, the largest time consuming task was auto-publishing all the thousands of updates per day - this has now been changed to a premium user feature. You can still sign up for free and continue to post your updates manually - without a charge. This will always remain the case, but for the future auto-posting updates will be limited to those with a subscription.

The changes to the support ticket system are also now in favour of subscribed users. Any support emails from subscribers will be answered first and the rest at some point later in the week.

I know this is quite a change to how the service previously ran and I also accept that some of you may not want to subscribe - I have absolutely no issues with that but I hope you can readdress your expectations in what you want from me.

There has already been a number of folks sign up for premium accounts and for those I’m grateful that you place a value on the service provided.

As always, if you have any questions, ideas or thoughts then please do use the comments below or if you would like to discuss in private, contact [email protected] and I’ll be happy to talk.

Lastly, thank you to all half a million Tweekly.fm users from around the world - it’s been one hell of a ride so far and I’m glad to have provided you with a service you enjoy.

If you’re reading this post, you are most likely a user of Tweekly.fm. I’d like to take a little time to write about the changes that have recently happened on the site. I’d like to note that I have come across some of the most fantastic…

Read More

Migrating Data From Runkeeper to Strava

Just a quick note, if you have previous used the Runkeeper platform and want to migrate your data over to Strava, there is a fantastic online tool that will do it for you called tapiriik.com. I've used it to bulk import all of my ride data over and it's been flawless.

Just a quick note, if you have previous used the Runkeeper platform and want to migrate your data over to Strava, there is a fantastic online tool that will do it for you called tapiriik.com. I've used it to bulk import all of my ride data over and it's…

Read More

20 Years of Zeldman

I watched a good documentary this morning talking about Jeffrey Zeldman. If you've been in the web industry for a long time, it's a really good watch and triggers quite a few memories.

I watched a good documentary this morning talking about Jeffrey Zeldman. If you've been in the web industry for a long time, it's a really good watch and triggers quite a few memories.…

Read More

Automating Docker on a Gitlab CI Server

I've currently been setting docker up to run containers for a Gitlab CI server. The basic premise is that the CI server will vagrant up a box, run ansible and finally run phpunit.

This has worked well, however getting the docker containers to destroy afterwards hasn't been as clean cut.

From using a few other sources, I'm using this script via cron which runs every five minutes to stop and remove any containers that have been running for more than an hour (this is working for our current commit frequency but will need addresses as more things are moved to this CI server).

root@ci-runner:~# cat docker-clear-old.sh 
#!/bin/bash
for i in $(docker ps -a | grep "hour ago" | cut -f1 -d" "); do docker stop $i && docker rm $i; done

This is working quite well so far, I'd be interested in how you're doing this if you're a docker user too.

I've currently been setting docker up to run containers for a Gitlab CI server. The basic premise is that the CI server will vagrant up a box, run ansible and finally run phpunit. This has worked well, however getting the docker containers to destroy afterwards hasn't been as clean cut.…

Read More

Live a Life You Will Remember

Every now and then a track comes along with a great video. I came across 'Avicii - The Night' today and loved the video and story it told.

Every now and then a track comes along with a great video. I came across 'Avicii - The Night' today and loved the video and story it told.…

Read More

Ubuntu Server Management with Landscape

Both at work and personally, I run a lot of Ubuntu servers. It's now the standard OS choice for any new servers too. To help with management of these servers, I've settled on a combination of New Relic's server monitoring (and app monitoring for a certain few apps) and the self-hosted/dedicated version of Canonical's Landscape Dedicated Server.

It's pretty simple to get set up. You'll need a server running Ubuntu to install it on. I chose a Digital Ocean $20 droplet.

Create your droplet, run all current updates and check that that hostname is a FQDN. Next, login to the box and switch to root.

add-apt-repository ppa:landscape/15.01
apt-get update
apt-get install landscape-server-quickstart

After this has finished, you will now have an SSL cert at /etc/ssl/certs/landscape_server_ca.crt which you need to copy and make a note of.

root@landscape-server:~# cat /etc/ssl/certs/landscape_server_ca.crt
-----BEGIN CERTIFICATE-----
MIICAzCCAWygAwIBAgIJANbXg3JbmTu9MA0GCSqGSIb3DQEBCwUAMCYxJDAiBgNV
...
[snipped]
...
3fJBHsY6i5i70Gq/5FUV7O7bP7/wnLKIljrO7gI/d5DNEQmXUkgY
-----END CERTIFICATE-----

Make a safe note of the contents of that file. Next, switch over to your client server, and run the following as root:

root@landscape-client:~# mkdir /etc/landscape
root@landscape-client:~# apt-get install landscape-client

This will install the landscape client. Next, create the file /etc/landscape/server.pem and then paste the contents of the server SSL cert into this file.

After this, you need to add the variable ssl_public_key to your Landscape configuration file:

echo ssl_public_key = /etc/landscape/server.pem >> /etc/landscape/client.conf

The final step is to run the configuration utility on the client machine:

root@landscape-client:~# landscape-config --computer-title `hostname` --account-name standalone  --url https://landscape-server/message-system --ping-url http://landscape-server/ping

You'll be asked a few questions about getting setup and what to allow, tags to use etc. Customise to suit and then register the machine when prompted. If you get a connection error then check you've pasted the certificate correctly and added the ssl_public_key variable correctly too.

A couple of links that were useful reference:
http://askubuntu.com/questions/549809/how-do-i-install-landscape-for-personal-use
https://help.landscape.canonical.com/LDS/QuickstartDeployment14.10

Both at work and personally, I run a lot of Ubuntu servers. It's now the standard OS choice for any new servers too. To help with management of these servers, I've settled on a combination of New Relic's server monitoring (and app monitoring for a certain few apps) and the…

Read More

Coca Cola & Facebook TV Ads

Every now and then a TV advert I see makes me stand back and take notice. I've got to be honest, I don't watch a whole bunch of television so I've probably missed out of a few, anyhow - two at the moment really stand out.

Coca Cola - First Time

You can also download the track from that one on the Coca Cola website for free.

Facebook - Our Friends

Every now and then a TV advert I see makes me stand back and take notice. I've got to be honest, I don't watch a whole bunch of television so I've probably missed out of a few, anyhow - two at the moment really stand out. Coca Cola - First…

Read More

PHPStorm: Set your shell to ZSH

If you're a PHPStorm user and also use oh-my-zsh, you can set your default shell to be ZSH in the settings. Head into the preferences, select Terminal, then there is a box for Shell Path, stick in your zsh path - usually /bin/zsh on the mac, like so:

PHPStorm Configuration Settings

Now when you use the Terminal panel, it'll be zsh instead of bash:

ZSH Terminal within PHPStorm

If you're a PHPStorm user and also use oh-my-zsh, you can set your default shell to be ZSH in the settings. Head into the preferences, select Terminal, then there is a box for Shell Path, stick in your zsh path - usually /bin/zsh on the mac, like so: Now…

Read More

GPS for Unlocking Train Doors

I came across this web page a few days ago which describe an issue with ThamesLink trains having their doors getting stuck due to GPS blackouts. You can read the full article over at ciras.org.uk.

I came across this web page a few days ago which describe an issue with ThamesLink trains having their doors getting stuck due to GPS blackouts. You can read the full article over at ciras.org.uk.…

Read More

Vagrantfile for Open Source Version of Odoo (formally OpenERP)

A couple of colleagues and I have recently been looking at Odoo, there is an open source version which you can self host. There didn't seem to be any recent Vagrant based versions of this, so I've put one together which you can clone from:

git clone https://github.com/ssx/vagrant-odoo

Then run:

vagrant up

It'll then get the latest install script, run it and get the environment set up. Theres more information in the readme.md file within the repo as well.

A couple of colleagues and I have recently been looking at Odoo, there is an open source version which you can self host. There didn't seem to be any recent Vagrant based versions of this, so I've put one together which you can clone from: git clone https://github.com/…

Read More

Find Installed Packages on Ubuntu (and dpkg) Systems

To get a list of all the installed packages on an Ubuntu or dpkg based server, you can use the following command:

dpkg --get-selections | grep -v deinstall

To get a list of all the installed packages on an Ubuntu or dpkg based server, you can use the following command: dpkg --get-selections | grep -v deinstall…

Read More

Travel Logging App

I need to find an app of some type (preferably Mac or iOS) to log my travel around the world. I currently use TripIt pro to arrange travel which does its intended job very well, however what I would love to be able to do is have an app where I can store notes, routes, locations and photos from my trips around the world. I have previously used Knapsack for Mac which was great but is sadly discontinued.

Do you use anything currently for this, seen a product that you think would fit? Let me know in the comments.

I need to find an app of some type (preferably Mac or iOS) to log my travel around the world. I currently use TripIt pro to arrange travel which does its intended job very well, however what I would love to be able to do is have an app where…

Read More