Share the Best Photo You've Taken
I asked people to share the best photo they've taken on Twitter.
Human · Software Developer · PHP, JS, APIs, DevOps, Mobile & Open Source.
About MeI asked people to share the best photo they've taken on Twitter.
Indian attitudes to non-married couples makes life unnecessarily hard for them.
Using git reflog is a powerful tool that you should add to your developer toolkit.
AWS S3 lets you set custom headers for pre-signed URLs.
Not everything needs to be a subscription.
You don't need to buy an app to quickly zip and encrypt files on a Mac.
On September 14th 2019, Strong Customer Authentication (SCA) laws will come into action within the European Union.
The maintainer of the popular Laravel Homestead box has a new project that is a paid-for PHP 5.6 Vagrant box which is perfect for legacy apps.
Mozilla have unveiled a really useful and secure way to send one off files to friends, family and colleagues.
The de-facto default modern web server has been acquired and hopefully that doesn’t mean too many changes.
I picked up a new feature within Google mail today when an email was sent to me but not with the persons usual email address.
If you're using the excellent Vessel by Chris Fidao and want Horizon to start automatically, tuck into this post.
In a Laravel Nova based project I had a list of domains that sometimes grew to take up most of the row it was in. I discovered the following pattern to show a limited field on the index view and a full field on the edit view.
There aren't many times I'd recommend to replace built in system tools, but exa is a marked step up from `ls`.
LetsEncrypt have updated their challenges and renewals using the TLS-SNI-01 challenge will fail. You'll need to upgrade certbot/LetsEncrypt to use HTTP-01 challenges instead and manually reissue your certificates.
Over the Christmas period, I’d read a few threads online about whether developers should register domains on behalf of clients. A domain name is the core piece in every company’s online presence. I’ve always had a firm, emphatic answer to this question which is no. Always get clients to hold their own domain registration.
At the start of every year, I write myself a set of aims that I'd like to complete in the next year - all realistic and do-able.
I've set myself a reading target of 14 books completed in 2019.
I recently worked on a project that needed an export for an Orders view within a Laravel Nova panel. If you have simple requirements, for example, exporting all fields with titles – that is relatively simple to produce. However, I needed to update fields and merge others with some other custom changes.
I recently asked on Twitter on what people used for screen capturing. I actually wanted terminal recording to highlight some commands being ran for a talk about serverless. I then came across the brilliant Giphy Capture app and it’s so simple to use and produces perfect results every time.
I’ve seen quite a few people posting to Twitter recently that they’ve tried or are actively trying out Mastodon as an alternative to Twitter.
I tested a couple of recommendations for AWS’s Glacier and settled upon ‘Freeze‘. It’s reasonably priced, great to use and has every feature you’ll need.
The backup service Ottomatik implemented webhooks last year (at my request, ha!) to send success or failure payloads to a URL of your choice. As Ottomatik doesn’t yet provide a Slack integration. Most teams around the world use Slack to pipe notifications into their channels and it’s a pretty good way of doing things.
Ubuntu Zesty no longer is a supported version of Ubuntu, you’ll need to
update apt/sources.list to this:
I noticed when taking a look at HQ Trivia’s traffic, they look to be adding support for answering with friends:
Quick way to clear bash/shell history:
If you have a file such as php-fpm.cgi that won’t delete no matter what
you try, it’s likely immutable. You can remove the immutable flag using:
I recently came across the git-legit project which creates a few easier to understand aliases for newcomers to Git. Head over to http://www.git-legit.org to read and install.
For a Titanium project I recently needed to install an older version of the Android SDK tools (build tools API 24) to build an old project.
This is quick and easy, head over to https://selfsolve.apple.com/deregister-imessage/ and fill in your mobile number. It will then SMS a code which you need to input into the site and then deactivate iMessage for that number.
List all Digital Ocean servers IPv4 addresses using doctl homebrew package:
Recursively list sizes of your AWS buckets using s3cmd:
Using ipinfo.io, you can quickly grab some IP data for the current machine:
ServerSignature Off ServerTokens Prod
<IfModule mod_expires.c> ExpiresActive on ExpiresDefault "access plus 30 seconds" ExpiresByType text/html "access plus 15 days" ExpiresByType image/gif "access plus 1 months" ExpiresByType image/jpg "access plus 1 months" ExpiresByType image/jpeg "access plus 1 months" ExpiresByType image/png "access plus 1 months" ExpiresByType text/js "access plus 1 months" ExpiresByType text/javascript "access plus 1 months" </IfModule>
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.example.com$
RewriteRule (.*) https://www.example.com$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
"v=spf1 -all"
cat example_com.crt COMODORSADomainValidationSecureServerCA.crt COMODORSAAddTrustCA.crt AddTrustExternalCARoot.crt >> ssl-bundle.crt
Test excerpt that is the top title of a page.
I’ve noticed over the past few months my usage of the Laravel validation engine has increased a lot. I’ve even used it in some non-Laravel applications just because I’m a fan of the interface. I had the idea of sharing some of the validation rules with the community but there wasn’t too many people doing the same.
I needed a small tool recently to set Telegram webhooks quickly over a few projects. You usually just run a curl command to do this but the format is something you have to remember – this is a lot simpler. Just head over to https://telegram-set-webhook.tools.dor.ky/ to use it.
Easy way to run rtorrent in Docker is using Docktorrent like this:
A while ago I remember seeing a tweet from Ryan Florence about docuemntation:
I recently ran into an issue where a Magento site that had been duplicated for development kept redirecting to the original site URL. Turned out that the culprit was a setting called SSL_OFFLOADED which needed to be turned off.
If you’re in the UK, you can easily stop a lot of marketing calls by signing up for the Telephone Preference Service. It’s extremely simple to do, send a text message to 85095 with ‘TPS email@address.com” – don’t forget to remove the quotes and add your email address in.
Telnet has been removed from Mac OS High Sierra, but can still be useful for developers to check ports are open etc.
This is a really good idea about adding a message to your lock screen on MacOS with a note on how to contact you in the event your Mac is lost.
I recently started a new project and wanted to give Laravel’s new test framework Dusk a try. Locally, this was quick to do and it worked first time – however when I then connected up CircleCI I needed to do a little extra work to get up and running. In short, the version of Google Chrome needs updating to a newer version and then things should be running well.
Something I picked up on a few days ago was using Docker’s –net-alias command (or docker-compose equivalent) for cheap and easy round robin load balancing.
At the moment, there isn’t a user friendly way of setting up new OAuth2 applications for use with Mastodon. You need to make an API request to do so. To help, I’ve written a small tool which allows you to do this securely in your browser.
This is a really nice tip for tidying up git diff‘s on Github (I think it’ll work for Gitlab etc too), you can add the following line to .gitattributes file:
If you’re a user of intents with Android and Appcelerator’s Titanium product, you may have instances where your intents don’t fire as you expect. A lot of sample code around the web for starting intents looks something like this:
I’ve recently been looking at unit testing some isolated components for a mobile application I’m working on. Part of the application is a calculations engine which I wanted to test against a known set of sample data and results.
A colleague at work told me about the way you can use interceptors in Magento 2 to wrap up before/after functionality of existing classes. This is a pretty good overview of how that works written by Jisse Reitsma.
This is a pretty neat new feature from Zapier to allow developers to build the little modules that connect apps together. They’ve released a CLI tool which will scaffold an app. You can take a look over on their developer blog in this post.
Matt Stauffer has a great post on how to remove Vue from default Laravel installations.
One of my favourite developers, Andrew Del Prete has written a new mini blog series on quick wins for performance and low hanging fruit changes that can be made to give you easy wins.
A talk given at Blackhat conference this year explain how Apple ensure that their customer data is safe. You can download a PDF of the slides here.
This is a really good overview of Google’s AMP project and how it came to be.
I’d seen a tweet to Ben Marks this week which detailed an SQL profiler for Magento 1.
Pretty interesting post on how some of the more obscurely named stations got their names.
If you need to install an older version of Android’s build tools, you can do so using the below. Search for the SDK version you want:
Check #magento2 glossary – https://t.co/e0mSvIpbvg and give us feedback.
— Max (@maksek_ua) March 19, 2017
Using nmap (installable with homebrew) you can run the following to get the IP addresses of all the HP printers on your local network:
If you have a newer version of build tools and need to fix the version currently in use, you can set the following:
You can use the following to display committer name and their contribution counts:
On OSX you can quickly base64 encode:
Try out our updated Quick Start for Magento 2.1.5 on the AWS Cloud – with Amazon EFS & Amazon ElastiCache! https://t.co/Y81C9wAQQi pic.twitter.com/6b47n6TlRr
— Amazon Web Services (@awscloud) March 20, 2017
.@metpoliceuk used an Indian agency to hack activists and journalists in UK – then shredded the evidence. Just wow. https://t.co/g0Y4RD2SOn
— Matthew Butcher (@matthew1butcher) March 21, 2017
Friendly reminder → in PHP, string functions are haystack/needle, array functions are needle/haystack (except array_filter).
— assertchris (@assertchris) March 21, 2017
Interesting post about taking a server-less approach to running a cloud service.
If you’ve been complaining about M2 being slow during development: read this! Awesome summary! https://t.co/QiZ48WlVz9
— Anna Völkl (@rescueAnn) March 19, 2017
Quickly generate a new SSH keypair and then a CSR:
Found this piece of code a while ago which is useful if you want to start projects from a skeleton repo or similar starting point.
Really decent article on how to use a homebrew installed Mailhog for Laravel Valet.
git config --global alias.alias "config --get-regexp ^alias\."
Run this in your terminal to allow the option of selecting install from anywhere:
If for some reason you find yourself needing to use `nano` in a Docker container, you can set the terminal type and then you’ll be able to use it. Say for example you ran `bash` with the exec command, you can then run:
This is a nifty little app that will allow you to share a terminal console with others. It’s called teleconsole, check it out if you have a use case.
If you want to specify the keyfile used for an SFTP connection, you can use the following:
Minor issue this morning where Vagrant wouldn’t fetch a box completely, turns out that the local cache looked corrupted and you would get this error:
If you use couscous.io to generate documentation and Laravel Forge, you can set up auto deployment and publishing quite easily. Setup the site in Forge, making sure you have a composer.json and an empty public directory in your repo.
Really good post on the cultural differences when trying to apply an already successfully model of entry.
A very well written piece on someone being scammed by a startup and a list of tell tale signs/red flags to watch for.

If you need to install a specific version of Titanium’s SDKs, use the following command:
If you wish to clone a repo using a set private key, you can use the following syntax to do just that and it won’t add the private key to your usual SSH settings:
A few tasks that I’ve been working on this weekend have needed public/private key pairs. The very useful phpseclib library provides the tools that you need to generate these within your application.
If you’ve ever wanted to embed a Github file into your site, in the same style that Gist does, there’s a decent app over at http://gist-it.appspot.com that will do just that.
This is a pretty nifty service I come across a few days ago. It’s called Shodan and searches then indexes internet connected devices around the world.
There’s a good article on using UUIDs instead on integer IDs on on Medium by Steve Azzopardi. Head over to “Setting up UUIDs in Laravel” on Medium.
If you’re a Mac OSX user and would like to send your audio over to a Chromecast device (ie, playing iTunes or Spotify) then there’s a fantastic project called soundcast which will allow you to do just that. You can find the project over on Github at https://github.com/andresgottlieb/soundcast.
Handy tip: You can drag/drop files from an #iTunes playlist into a mount device on OSX. Useful for portable devices. #osx #mac
— Scott Wilcox (@ssx) May 8, 2016
If you’ve often seen things looking for a directory called .well-known on your HTTP server access logs, you’d be like me if you were surprised to know there is actually quite a lot more to that directory name. It provides information about services and a whole bunch more. You can read a lot more on Mattias’s blog post about it.
This script will send an email when a file changes in the given path. Can’t remember where I picked this up from but it’s useful to have when you need to debug something that writes files.
If you’re a Virtualmin user and use the iptables based firewall, you may have issues with outbound FTP working. The FTP connection can often be made, but then stalls at receiving data.
If you’re a heavy PHP user, you’ll most likely be using packagist.org quite a bit during your development cycles. A quick win in speeding this up is using a local cache for Packagist which means you’re only downloading across your local network instead of across the Internet.
This is a nice feature being added to Google docs that will allow you to save your document as an ePub file. You can read more over on the Google Apps Blog.
If you’re looking for an alternative system for ticketing, I ran across this self hosted clone of Eventbrite called Attendize. Seems to be Laravel based and looks reasonably nice too.
Quite an interesting new project by Google. Helping victims survive digital attacks. You can find out more at https://jigsaw.google.com.
I’ve added a composer installable package for the excellent UK postcode library written by Stephen Morley.
I’ve seen a few pieces of API code dotted around the web recently where people have written simple JSON APIs but their error handling still returns HTML instead of JSON for 404 errors and the likes. This is pretty simple to solve with Laravel or Lumen and easily testable too. The cleanest way I’ve seen of handling this was written by Paul Redmond in his book ‘Writing APIs with Lumen’ which you can purchase on Leanpub.
This is the first post in a two part series detailing how you can use Docker to run local caches of both remote NPM resources and composer packages.
Great development from the Roots team to make WordPress use bcrypt for it’s password hashing. You can read more on their blog post here.
There’s a recent change in the handling of SSH keys in MacOS Sierra that means you need to enter your passphrase each time a key is required. There’s an open Radar issue about it and it’s intended behaviour now.
If you’re a Laravel user and you’ve been looking for something to profile your application, try Anbu. It’s created by a friend, Dayle Rees and is currently in early beta but would be great for you to try and help out testing.
One thing that I often forget about is a nice feature in Laravel that allows you to push scripts or other blocks of code into another part of your templates, so for example:
This was a pretty interesting read on how bank payments work.
Liking Phan by @etsy for static analysis. PHP7 based, works well.
I came across this blog post this week which details approaches to testing, check it out:
If you’re using SQLite for your project and you’d like to query the database directly. For Android based devices or emulators, you can do the following:
I noticed with the Virtualmin export feature that the Apache htpasswd sometimes doesn’t carry through when you import the package, you’ll end up with an error similar to this:
If you want to see what your most used commands are within Terminal (will work on Linux too). You can run this command:
In the recent update of GenyMotion (Android Emulator) there’s a change which breaks its compatibility with Titanium Studio. You’ll need to open Terminal and create a symlink to fix it, start by opening Terminal and running:
If you use Cloudflare, you’ll need to configure Nginx to provide the real IP addresses, you can do this by installing
Each email box can store a max of 3GB if you’re using IMAP – but if you add the IMAP account to your phone and computer, they’ll stay in sync (ie, read messages, new mail etc). If you’re using POP3, it downloads the messages permanently to your computer and nowhere else (first to fetch gets the message).
Probably shouldn’t advise people to do this:
I download a lot of linux images, by far the quickest way is via torrent. Recently discovered a nice implementation of rtorrent in a Docker image, via docktorrent, simple enough to run:
Came across this OSX tip recently which will prevent Photos or Image Capture:
I’ve used this tip myself previously, it’s useful if you want to set a default for a checkbox, such as false:
Pretty useful for downloading everything in an FTP account:
I’m happy that PHP7 has finally been released, I’ve been wanting to correctly return type hint for such a long time. You can now do this comfortably:
If you’re a Paypal user and use their IPN functionality, the link to get to the history page is hard to find. You can find it at:
Interesting new document provided by Google which details their search quality ratings. It’s nice to see them actually release something like this officially.
Pretty neat tip, I needed to add a prefix of ‘ufw deny from’ to a list of IP addresses in a file, you can do it easily with awk, using this:
Helpful for finding strings in PHP files:
I recently had to replace a hard disk in our OSX server at work. It had been a while since I had done this so I noted down the steps here to run through and change it. Work out which disk in your machine is faulty and replace it with a new drive.
This is an ongoing list of software that I find useful while developing on my various Mac machines:
This short post is just a reminder for myself when writing supervisord configuration files, it’s extremely useful for running daemon workers (such as Laravel’s queue workers). You’ll need the supervisor Ubuntu package installed.
If you use a few Ubunutu servers then you may have come across their management product called Landscape. It’s a pretty complex solution to set up, however with advances in Docker and useful work from the UK Home Office, there is now a Docker image you can use to run it, take a look at this Github repo for more information.
Update: I no longer use Linode, but I had this draft laying here, so decided to publish anyhow.
If you’re interested in running Ghost for your blog inside Docker. It’s pretty simple to get it up and running.
I’m currently working on a new project that houses a framework for multi-tenant applications based on Laravel. The source code is stored in a hosted Gitlab instance via Githost.io – which is run by Gitlab themselves. There’s a set of unit tests that I wanted to run via continuous integration to run the tests with each commit and fast.
If you need to enable the remote API on an Ubuntu 14.04 based system for Docker, you need to do the following, edit the file located at:
If you’ve recently upgraded your Mac to OSX El Capitan and you have an issue where Virtualbox has decided to no longer work, try this:
Just a note more to myself as I always forget the syntax of this one. To delete a tag both local and remote:
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:
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.
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:
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:
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.
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.
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.
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’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.
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:
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.
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:
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.
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:
To get a list of all the installed packages on an Ubuntu or dpkg based server, you can use the following command:
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.
If you run a Gitlab server and you need to use a custom SMTP service, there is a good set of instructions over at Elijah Paul’s blog:
If you need to update the modified timestamp of a set of files recursively, you can use the following:
There’s a fantastic website that you can run curl to fetch a list of the blacklist and simple mail checks to ensure any of your servers that send mail aren’t blacklisted.
This is a really impressive TED talk that I watched earlier today.
If you’re using Digital Ocean’s Gitlab droplet, it’ll give you a fully configured instance for you to start using straight away. The most often case for people using Gitlab is for private repositories, if that’s the case for you then it’s worth creating a file at:
It’s been quite a few months for the tweekly.fm project. The original plan was to rewrite the user facing side of the service. Instead of just this, the entire platform was rewritten. The API’s that power the publishing of updates and collection of user data were rewritten from the ground up.
Update: Nino (see comments) has written a blog post on how to automate this a little, read it at http://rubyengineer.com/posts/2
If you need to split an SQL file into smaller chunks, I found this little utility called sqlsplitter that will do exactly that. You can download it from http://rodo.nl/index.php?page=mysql-splitter.
Please note: This post assumes you are comfortable with Vagrant, Virtualisation and generic admin tasks on a server.
If you need to format an encrypted disk on OSX, you’ll need to use the command line diskutil as Disk Utility won’t let you do anything with the device.
If you need to add a log file for memcache to help debug an issue, you can either use the following syntax:
I recently had to fix a Windows machine that had a broken user profile and needed to add the new user to the admin group.
I read this week about Twitpic closing down and it left me feeling disappointed. It’s not the first time that Twitter have pulled a move like this. For me, the difference with Twitpic is that it was one of the first services that offered something Twitter didn’t do at the time.
If you’re a Slack user (and you should be) and wish to use the Mac app, it’s a bit tedious for those of us who are in multiple teams. They’ve recently released a beta version that has support for multiple teams in a much better interface.
We’ve all been there. A friend sends you a link to an internet shock site. If you’re familiar with the hosts file on your machine, then you can use this large sync-able list to compliment your own rules. If you using a Mac, you can use the nifty Gas Mask program to edit your hosts file without having to jump into a shell.
If you’re using Virtualmin on your servers and have a few odd FTP error messages (happened for me using SFTP too), then it’s one of three things.
I recently needed to capture the output of phpinfo() for a to a log upon install. I’d been able to do this in the past but couldn’t quite remember how I managed it. This is where ob_start() and ob_flush() come into their own.
I recently had to do some work on an older site that used the PHP implementation of ActiveRecord. One of the issues I had was that the queries being ran weren’t produced the expected result. I found two commands to help with this an issue the last run query:
If you need to install an older version of Laravel for use with a server that has PHP 5.3.X for example, you can do so using the following command:

Interactivity for Payment Forms
I always forget about how awesome Laravel Collection’s are. I came across this gem when needing to run a filter on every element of an array. I think it may of been Dayle’s book that first informed me of them. For example, if you have an array of fruits that you want to filter down, you can do the following:
If you haven’t noticed yet, the Laracon US 2014 videos have been posted online for a short while now, you can grab them over on Userscape’s website at http://userscape.com/laracon/2014/.
I recently wanted to replace my statically generated sitemap.xml file with a dynamically one generated by ghost. It ended up being pretty trivial to do, but the following two links helped immensely. At present, it’s a hack to the core which you’ll have to repeat if you upgrade – but that’s a small price to pay for having your sitemap generated dynamically.
If you’re a MariaDB user and need to set the max_connections variable a little higher while the server is running, you can use the following SQL query:
A while ago I wrote a post about using the basic ftp command to recursively fetch remote FTP files, it seems this doesn’t completely fetch them recursively. A great little program called NCFTP will do this accurate and pretty quickly. Install NCFTP if you haven’t already, then run the program:
I picked up this function somewhere a while ago, it’s useful when you want to remove all the children elements of a view in Titanium.
After Apple’s impressive WWDC keynote earlier, you can download the reference manual for the Swift programming language for iBooks using the following URL:
Nifty linux command to remember:
Quick tip, if you need to find the version of a CS Cart based website, simply append ?version to the query string, so for example if you shop name is mysupershop.co.uk, point your browser at:
On the 15th May, a work colleague and I attended Laravel London for a couple of talks by Aussie Kirk Bushell and Maks Surguy. Both were great presentations, Kirk spoke about abstracting validation away to use across your application and Maks spoke about the pitfalls of ajax file uploads.
If you wish to set your environment by using server environmental variables with the new Laravel Homestead you can do the following:
If you ever need a progmatic way to drop all tables in a database, you can use the following stored procedure:
Hello!
I needed to prevent Laravel from using sessions for a few API endpoints in an app, this is how I did it:
I’d picked up a couple of the slides published for this years Laracon event in New York.
I absolutely love data and robots.
This is a pretty useful package to create database seed files from an existing database.
A recent Freedom of Information request that I had placed at the local council has been returned. There were a few notable buildings currently vacant which I will document further soon.
One thing I’ve seen asked often in the Laravel forums is how to validate that an uploaded file is an image. The quick couple of snippets below detail how to perform this common task.
You can add a whole folder of eBooks to your iOS device by opening iTunes, select the files and then drop them onto the device name. It’ll take a few seconds to copy over (or minutes if you have a lot of books).
This is from the slightly interesting notebook.
Maldet is a malware scanner that’s useful on servers that accept file uploads. I use it especially on servers where I have WordPress sites hosted and it alerts me to the fact that people have used themes with Malware tucked away inside.
A recent post by the saasclub.com newsletter had a good article in it by Clément Vouillon which was titled “9 Lessons Learned Building SaaS”. Effectively they had asked a few members of eFounders what the lessons they learned when building their services.
By now you have probably read the news and seen the warnings about the OpenSSL Heartbleed security vulnerability that is present in certain versions of the software that powers 66% of the internet.
If you’re a #devop then at some point you’ve probably had to deal with Apache’s mod_rewrite. You can find a really handy tester written by Martin Melin on his website.

Content coming soon.
Content coming soon.
Content coming soon.
Content coming soon.
Content coming soon.

Tech companies, this is your chance to get a little free advertising. I’ll be attending the wonderful Laracon EU 2014 conference in Amsterdam this year and I’ll happily wear a t-shirt from your company while I’m there.
The most popular and prolific codebase I’ve created and worked with has been the best way to post last.fm to twitter, the wonderful tweekly.fm. Each day, the service publishes hundreds and thousands of social media updates to Facebook and Twitter.
I’ve recently began to use Markdown for almost all of my text writing needs. This includes technical notes, readme documents and Github commits/issues/comments. Even my blog is now powered by Markdown as I’m using Ghost.
If you’ve missed the news today, Microsoft has finally released an iPad version of Word, Excel, Powerpoint and One Note on the app store.
A neat feature I came across this week was the Google Apps toolbox. If you’re a user of Google Apps then this can be very useful to track down issues and configuration problems.
If you encounter an error resembling the following:
Planning for Laracon EU 2014.

Ever wanted Excel to display column numbers instead of letters (think CSV imports!):
If you’re a Heart Internet customer and have a project that needs to run a newer version of PHP, you can add a SetEnv flag to your .htaccess file to switch the version on the fly.
Check it out over at http://www.apigility.org/.
The command below will display information about an SSL certificate to STDOUT.
A recent project used the fantastic iron.io platform to process background jobs (highly recommended if you need to write anything at scale). Part of the task required access back across the Internet to a server behind a firewall.
Fix:
I often have the need with jQuery validate to test whether or not a value is equal to a predetermined one. The method below provides that functionality:
If you install Laravel 4 and you’re using Apache with a certain Virtual Host configuration (specifically using VirtualDocumentRoot in my case) then you’ll need to include a RewriteBase directive within the .htaccess file in public/ to correct it.
Just a quick note, it looks as though you can’t use a forward slash in the name of a beanstalkd queue name.
While debugging a legacy application recently, I came across an ajax script that was returning the header below and failing in IE:
I had to fetch a few thousand files across a few directories on a remote server recently and I was going to use NCFTP, however I’d remembered that the stock ftp program on linux can in fact do a recursive fetch. You need to remember to turn the interactive prompts off as well, because if you don’t then you will have to press the ‘Y’ key to download each file.
A quick overview of using views in MySQL.
PHP interfaces are still quite new to most. Below is a simple demonstration of their usefulness. I think I’d seen this within one of the many fantastic laravel books.
Came across this tip by a work colleague the other day, if you’re a traveller and use Apple devices, you can use the Apple multi plug instead of having to carry a figure-8 cable around with you as well.
I had to fix an issue recently where Apache Solr wasn’t returning any results for German words. After altering the schema to accommodate the German language, the same issue of being unable to search for German words was still there. It turns out that earlier version of Apache Tomcat aren’t UTF-8 enabled by default, it’s a configuration option that you need to explicitly set the URI encoding used.
Recently I’ve been doing quite a lot of work that required UUID
generation. There is two PHP libraries for generating UUID’s. One of them
hasn’t been updated in a long, long time and the second one has absolute
no documentation for it. After spending a few moments trying to guess the
function names that this newly compiled extension provided, I found that PHP has
a command called get_extension_funcs() which does exactly what it says on the
tin. It will provide you with a list of functions that an extension can provide.
Over the holiday period this year, I decided to get a few things off my to-do list that have been sitting around for a while. I decided the contents of my Christmas geekery would be worth of a blog post and that is the one you’re reading now.
// PHP: Get Accurate User IP Address
function strFindCorrectIP() {
$headers = array(
'HTTP_CLIENT_IP',
'HTTP_X_FORWARDED_FOR',
'HTTP_X_FORWARDED',
'HTTP_X_CLUSTER_CLIENT_IP',
'HTTP_FORWARDED_FOR',
'HTTP_FORWARDED',
'REMOTE_ADDR'
);
Over the years I’ve written numerous blog posts both on my own site and around the web too. They have ranged from topics close to home and choices in life that I’ve made, to being focused on programming and technology. I’ve often used my blog to share code snippets and to ask opinion on programming methods. As a person, I’m always keen to listen to others, both in technology and life.
If you’re working with the Google APIs, one of the error messages you may come across as:
Source: @Grumpydev
It’s not very often that I come across a site which I find truly amazing. I came across Station Maps by Andrew Godwin this evening and found them completely fascinating. I have a long standing interest in the London Underground system and to see the stations in this way rekindled that greatly.
I’ve just had the following email from TFL explaining that they’ve now placed all my Oyster travel journeys into the online portal. Can’t wait to see if they expose this data via the API too.
I recently got the book “MongoDB and PHP” by Steve Francia which had an interesting paragraph in the first chapter that talks about how the use of stored data has changed in recent years:
The current version of Virtualmin ships with an issue for ProFTPd on CentOS due to two modules that it needs to track connections not being loaded. There is a quick fix for this, you’ll need to edit the iptables-config file located at:
There are quite a few circumstances where you may need to force a site, app or page to serve over a secure SSL connection. In PHP development there are two ways to approach this problem depending on your setup. If you’re using Apache to serve your site and you have the ability to use .htaccess files then you can use a rewrite rule to simplify this task server side.
As you probably know, I was in Toronto for a couple of weeks earlier this year. In a new respectful habit I’m trying to force myself into I’m making my views on locations visited know via Foursquare and Google Places. The list below contains all the name worthy places I’d visited and a short review of each venue.
A lot of things get my attention in the news now-a-days but a piece from Kuala Lumpur impressed me. A new law has been passed in Kuala Lumpur that stipulates food and drink outlets must now provide free wireless internet in order to be granted or to renew a license to operate. I think this is a fantastic step from the local government as Internet access has been a must have for most people in recent years.
For a recent piece of PHP I was writing I needed to find the start and end timestamps for a given week. I came up with the following piece of code to achieve getting the timestamps.
For quite a while now one feature I’ve felt was missing from the Facebook Graph API was searching for events by latitude and longitude along with a distance. You can currently issue a search for place objects, but the place object is the only one which honours the center and distance parameters.
A couple of times recently I’ve needed to create new Google accounts. If you’ve recently needed to do this you probably noticed that Google’s default form now wants you to effectively create a ‘screen name’ which will come with GMail.

One of the less common server tasks during the year is the setup and maintenance of SSL certificates for web services. There has always been the air of dread when this comes around but I’m not too sure where the reason for that comes from. The process is simple enough to go through and you have two choices in how you use SSL.
An odd bug in OSX Lion means that the keyboard repeat rate options in the Keyboard preference pane doesn’t get honoured. To enable this, you can run the following command at a Terminal prompt:
One of the most often asked questions for me when it comes to Facebook is how administrators of pages and profiles can set usernames. In the past, Facebook haven’t really pushed this feature but in the age where social marketing and name based branding is becoming more important – setting your username is a bonus point when it comes to promoting your brand.
http://www.youtube.com/watch?v=7jrnj-7YKZE
http://www.youtube.com/watch?v=XrOgDCZ4GUo&feature=related
Fire up a terminal and enter the following to enable Airdrop on all macs:
A lot of people use Skype now-a-days and one convenient feature is the ability to use the skype:// protocol handler for creating actionable links on the web. Examples of this are to initiate a call, or add a user as a friend. The list below details the types of links that you can use:
If you would like to check the status of your Apple products, enter the serial number below and click ‘Check Warranty’. If you need help finding your serial, take a look at Apple’s official instructions.
One task I had to recently complete was cleaning up the Facebook ecosystem for a particular business. Around Facebook there were a few groups, profiles and pages purporting to be the business which needed removing. There are two types of infringement that you can report to Facebook and get actioned, explained below.
commercial— id: 38 title: What is a QR Code? date: 2011-09-17T15:37:15+00:00 author: Scott Robinson layout: post guid: http://beta.dor.ky/2011/09/17/what-is-a-qr-code/ permalink: /what-is-a-qr-code/ categories:

One of the most popular posts that I wrote previously for my blog was regarding the Twitter API and email addresses. That post has since been permanently archived and is no longer available It seems as though this topic is very popular among new developers to the Twitter ecosystem. In this post, I’m going to revisit that topic once again.
The eTrex Vista HCx is a fantastic little GPSr. The one that I currently have is from Matthew who loaned it earlier this year when our Dakota malfunctioned. After being out in the Roaches, the eTrex suffered an impact injury and began to rattle. Fortunately this was easy to fix as it was only a cover of the speaker inside the GPSr.

Garmin provide many types of maps for their devices but each costs quite a large sum of money. Thankfully in recent months this process has become a lot easier for the end user to do. This short guide will explain where to find the correct map file and how to install it using a Dakota 10 GPSr, a Mac and Garmin”s free software.
A lot of what I talk about these days seems to be Geocaching related. The concept of Geocaching has long been around and at present the biggest central location of cache information is at geocaching.com which is owned by Groundspeak. The website, applications and tools are pretty average to use and no real changes have been made to the way that users interact with the site for a long time. The iPhone application is clunky at best and is a difficult to use at times. The reliability of the application over mobile connections is also questionable. All of the caching data is held by Groundspeak and although premium members can retrieve data via Pocket Queries (multiple caches in a single GPX/LOC file) and single file downloads (one cache per GPX/LOC).
Earlier this year T-Mobile announced that they were merging with Orange. This didn’t matter too much to most at the time but its changed a little now. For a while they’ve been testing network sharing and its now live for customers to use. If you’re on T-Mobile you need to first text ‘Yes’ to 2121. This will switch your account to use both networks and whichever has a signal. You’ll get a text back saying that your account has been changed. Remember that at present if you’re a T-Mobile customer using the Orange network you only get 2G, not 3G so things like YouTube won’t work (unless you’re jailbroken and forcing it to).
One thing that appears to be a recurring theme on the Twitter API development mailing list and in the IRC channel of Freenode is the question of getting access to a users email address. I’ve always found this frustrating and have never seen a good reason why a users email address should be given out via any API method. The following list contains the reasons that are most often given when you ask why an email address is desired:
I was asked earlier this year to take part in an Open Data survey to see how data was being used. The survey was performed by Tim Davies. You can find the report here or a summary here.
This weekend marked the first GeoCaching event that I’ve been to. “To Cache a Kippa” was held at the Keele University KPA and they placed ten new caches around the campus that we got a few first-to-finds on. It was really nice to meet fellow cachers and share stories about being out caching. We have met a few other local cachers while being out like Mick and Mandy. I also speak to a few cachers quite often and it was nice to be able to put faces to names on Saturday evening.
For a long while now I’ve been visiting a place in the Roaches called Luds Church. From Gradbach to Luds Church is a good 15 to 20 minute walk that you would take, the only people you used to see on your way is at the old mill which is now a Youth Hostel. In winter the chasm is beautiful to the extreme with stalagmites and icicles hanging down all over and the peacefulness and tranquillity usually associated with an actual Church.
As many of the regular readers of this site and my Twitter account will know, I’ve very much integrated GeoCaching into my daily life. Just like pringles you won’t be able to stop once you’ve started. GeoCaching is a very simple premise that is similar in principle to the old idea of letter-boxing. You can sign up at geocaching.com for an account an begin looking for GeoCaches in your area straight away. You will need some form of GPS receiver such as a Garmin. This article provides a little information on how to find a GeoCache and the best ways to hide your own caches.
This PHP script will post an update to Twitter using OAuth. You can download the complete script and library here.
After living in Stoke-on-Trent for quite a while again now I’ve come to realise like many others that when needing to find something out about local government – generally you head to stoke.gov.uk. This is an old site that has been online for a number of years without too much improvement. For a lot of topics you can actually find the information you’re looking for eventually, but the problem is that the lack of updated information throughout the site and its lack of usefulness to the general public are just two points on a list of problems for the site.
You can get quick information about any of your Apple devices by using their self service warranty information page, located here. For serial numbers from iPhones and iPads it’ll show supported networks, current warranty status and a little more. Its also useful for checking legitimacy of serial numbers.
While working on the new cache pages for this site I came across the interesting task of parsing GPX files with PHP. SimpleXML is quite easy to use and with the children() function you can use namespace extensions – for example with GeoCaching exported GPX files. You can get an awful lot more information from a GeoCache GPX than with standard XML parsing.
I wholeheartedly concur with Tom’s latest creation. I’m really surprised that nothing like this has been done previously, if it has then I’ve not seen it.
There is an emerging trend that local business won’t be able to ignore for too long. At the moment, all the rage with mobile devices seems to be location based services and games with Gowalla, FourSquare and Yelp being the primary platforms although Facebook is to launch its own version shortly which may comprise of an amalgamation of all three. These platforms reward users with points, prizes and badges the more they ‘check in’. I haven’t had chance to test out Yelp more yet, so I’ll exclude that from the results below.
In January this year when I first undertook the Tweekly.fm project in ran in a very different way than what it does now. I’ve completely rewrote the code base that the system works from. It now runs a lot faster and we can support more users than previous. I now run both statistics for Twitter (tweekly.fm) and for Facebook (laststat.us). The past few days I’ve pushed changes out that change the way the system interacts with Last.fm and how we store your data.
The system of rewarding customers with points, cards or discounts is a fairly standard practice amongst today’s modern business. This reward model is based around rewarding for purchases of goods and services and then allow these customers to choose a gift in return to reward their loyalty. The existing implementation are this reward network is singular in nature except for organisations such as Sainsbury’s nectar.
Over the past six years we’ve seen major developments around the world in online services and computing. Traditional web sites such as Google, Amazon and eBay have now transformed into multinational platforms offering more than just a site to use. All of the services I’ve just named still provide their main web site, but isn’t it about time we started referring to them as platforms rather than sites. In my opinion, it is.
My quote from a few days ago has been featured in the local newspaper “The Sentinel”. You can read the full article about Google Streetview coming to our counties on their website.
Quite a while back now in Internet history a system called ‘robots.txt’ was introduced to control the content that web crawlers and services are permissible to crawl. This file details a map which denotes what crawler/bot is allowed to crawl a site. At tweekly.fm I deal with a lot of user traffic and the complicated nature of our queries means that its quite intensive to generate the user pages.
One of my projects was featured in a print book.
The best thing about building a project that gets popular is the same as the worst things about a project that grows rapidly. Tweekly.fm is currently gaining 1,500 users per month most of which decide to publish on a Sunday. This increases the load and run time of the delivery engine that pushes tweets outbound. The other side of an increased user base is that user pages get more popular. Although this is a good thing overall and shows our popularity – it also has its downsides.
I spent some time yesterday extending the StokeTraffic platform to include support for eye witness reports provided by users of the service. This now means that the service will include real time eye witness reports of problems and conditions of the roads in and around Stoke on Trent. All users are invited to participate in this extension of the service by using the new feature. If you’re travelling in or around Stoke on Trent and spot a problem then you can alert us by posting a tweet similar to the following:
This is the first in a series of posts I’ll be writing about how to get to and see parts of The Roaches and other Peak District places. I’ll also be making an effort to update parts of Wikipedia to reflect these changes too. Over time, paths change and the ways of getting to a lot of places change too. As I live in North Staffordshire I’m in a great location to be close to The Roaches and the Peak District and I’ll attempt to keep sites such as Wikipedia updated as well as my own collection of posts here.

I completely found myself in shock earlier today when I had to use the ‘forgotten password’ feature on geocaching.com. To my complete amazement, they emailed my password back to me in plaintext. Now, bearing in mind that most of their site is basic in features I’m sure they haven’t generated their own two way encryption so that means they’re storing passwords plaintext which in this modern age is suicidal.
This is a screenshot of the bandwidth usage for the Fonera router I flashed last week. Everything seems to be working fine. A couple of PDF documents that I found useful can be downloaded here and here.
This has been moved to http://tweekly.fm as I’ve rewritten and redeveloped the tweekly system.
A few people have asked about more details for the wireless bridge I’ve set up within my local network. You can find more information about it here. Its a pretty simple process and you end up with a router running DDWRT.
I’ve just written a request for more information from Google as I’m astounded to find no accessible API for Latitude. I find that completely shocking on their part.