sam doidge

Continual improvement

The Power of nohup

nohup allows is to run a command, close our connection, and still have the command run on the server - very powerful. I’ve used this at times I know I have a command that will take a long time to run, but I need to close my...


Digital Ocean Swap File

Digital Ocean is a great service, but by default no swap file is set on their droplets. I first realised this issue when my droplet was killing my composer update process. This can lead you to thinking you need a more powerful Droplet, but simply enabling...


Lists

Sharing a Pro Tip with you guys: Lists. Lists, specifically to-do lists, are very powerful. They allow us to take things off the mind, but them onto paper (or an app) and we now only have to remember one thing - to look at the list. This...


Lazy load Disqus comments

I’ve implemented lazy loading of Disqus comments, it’s just a better way of handling comments loaded via javascript I believe. There is one potential drawback on SEO, but on the plus side there is faster page loads (better for SEO). I also like the fact I only...


SSL / HTTPS with Cloudflare

I get asked a lot of questions (I don’t ). Here’s a how-to on SSL with Cloudflare (they now provide this on their free plan): If you are only using Flexible SSL (HTTPS between cloudflare and end user) you do not want a redirect in htaccess /...


GitHub Contributions

You’ve pushed code and realised your contribution isn’t showing up! git config --global user.email Does this match your GitHub email? I’m guessing not - set it with git config --global user.email "[email protected]" You’re welcome.


Redesign

Evolution, not revolution is the approach I have taken. I was inpsired by the view of the future and software / technology in the brilliant film Her. Something I wanted from a redesign was to increase simplicity and remove unnecessary css transitions...


Multiple String Search

grep is a great tool for searching multiple files and directories for a string - but what if we have a list of strings we are looking for? A great solution for this is to enter the strings into a file - one per line. We...


Background Server FTP Transfer

I had a lot of files to transfer, little bandwith from my laptop and limited timed. Can I have my server transfering the files in the background? Yes. My VPS has more bandwith than my current location. I needed to FTP the files, a little research and...


Fun Command Line Variables

Since my last post was such a success I’ve decided to continue the series. Command Line Variables You have a bash script that needs to FTP somewhere and want to test part of the script works outside of the whole script? Run...


Fun OSX Terminal Commands

I’ve put fun - open is fun in that a new window pops up over your terminal showing you the files you are browsing visually, and drag-ablly. History is just useful! To open a finder window in the current directory you are browsing in terminal, use:...


Public, private and protected in PHP

Not the most interesting post but essential for OOP PHP development: public scope to make that variable/function available from anywhere, other classes and instances of the object. private scope when you want your variable/function to be visible in its own class only. ...


Why use Sass?

Admittedly Sass has been out for years now, but I did’nt feel an urgent need to write about, until now. On small projects CSS can seem fine. On large projects they can quickly become difficult to maintain. Want to change a colour used...


Auto reload with Grunt

What is Grunt? A ‘task runner’ - it helps us with reptitive tasks through automation, running from the command line. Why use Grunt? Reloading web pages after an code change does not take long but the time and extra actoins required...


Do not use your domain name as a Hostname in Plesk

Cautionary tale: Do not use your domain name as a hostname. I installed a new version of Ubuntu with Plesk on my VPS again lately, and decided to use my domain name as a hostname within Plesk - thinking it would seem nice and orderly. Cue: an...


Fraser Island does not have more sand than the Sahara desert

My friend Neil mentioned the claim ‘Fraser Island has more sand than the Sahara desert’ when viewing footage of Fraser Island tonight, it sounded almost unbelievable. Googling the claim, several results came up. Two Australian tourist sites stating this is a myth, while...


Speedy Laravel Development

This is a quick post to share a small tool (Laravel-4-Generators-Bootstrap-3) to quickly generate your database tables, controller with CRUD functions and scaffolding views connecting all this with one command: php artisan generate:scaffold tweet --fields="author:string, body:text" scaffold is the powerful...


Setup local sites with OS X Mavericks

You’ve just installed Mavericks on your lovely Mac, and want to do some web development, probably with PHP. Things are made simple for us in this version. I’m on 10.9.4 - others may need some other changes on anything older releases of Mavericks. I like to have...


Hello Jekyll

I’m now using Jekyll - a tool which transforms your markdown into static html. Following a great tutorial from Joshua Landa I was able to setup site relatively pain free (This is a lie. On OS X Lion I had a nightmare even installing Jekyll...


Levenshtein Distance

The Levenshtein distance between two words is the minimum number of single-character edits (insertion, deletion, substitution) required to change one word into the other. – Wikipedia To implement in MySQL, use the following function – if using phpmyadmin you will need to set a different delimiter...


Fifa Trader

Fifa Trader connects to Fifa 13′s unpublished API to allow automated bidding and selling of Ultimate Team cards. Connection to FIFA servers possible from work done by numerous others on GitGub, my GitHub fork contains a current working app for ps3 accounts: https://github.com/samdoidge/FIFA13-Ultimate-Team-Search. Search screen once...


mongoDB

I created a site to test mongoDB, with Save a Tweet – storing my data in one ‘blob’. I like the simplicity, and not having to worry about relationships or changing the scheme down the line. I won’t be using this in place of MySQL on most...


SVN Tips

SVN is still around, some things I have found useful Add all files to SVN within current directory (recursively) svn add . --force Remove files from an add, within a folder (before commit) svn revert --recursive folder_name


Git Tips

Conflicts – if you just want to choose one version of the file or the other, you can use: git checkout --ours filename.c or git checkout --theirs filename.


Pro-shell-tips

cp -r /source-folder /destination-folder will not preserve permissions - you want to preverse permissions if backing up folder on a live server. cp -a /source-folder /destination-folder does the backup you want :) using wildcard in a transfer ignores hidden...


Using Git with Dropbox

**2014:** I now just use Bitbucket. note: I’ve set this up on Mac OS X. I’ve cancelled my beanstalkapp subscription, gone for a paid Dropbox one, and am moving my repos to Dropbox. cd ~/Dropbox mkdir -p Sites/your-repo-name/your-repo-name.git cd your-repo-name git --bare init...


Save a Tweet

Excuse the ugly design, this was a prototype image :) I’ve created Save a Tweet as a quick hack to experiment with mongoDB. With so many people saying something controversial, then deleting them, and a news article vaguely stating what was said, this...


Database backups to Dropbox

I’m automating my database backups and storing them with Dropbox. You need Dropbox running on your server for this - it’s a great guide, but note one key point : when ‘This client is not linked to any account…’ appears - leave the service open, do...


PHP London 2012 Conference

Roundup: Was it worth going? Yes. There is a lot to take in and it got my brain working. As programming conferences goes it was a riot ;) I was impressed with Rasmus Lerdof’s answers on the panel at the end of the Friday (the day I...


Find and replace a string across many files with Shell / Terminal

Useful commands for use with the Shell / Terminal. Spotlight tool - > ‘terminal’ to find on Mac OS. PHP used in this case, replace ‘php’ with the file extension of your choice. Find and replace a string across many files on MAC OS: find...


WordPress vs Tumblr vs Posterous

**2014:** Posterous is now dead, I'm using Jekyll I’ve come back to the blog world and had to choose a platform to write my words. For me the choice was WordPress. ###Tumblr### They have really carved their own space in the blogging world by trimming...


Minimalism

I’ve been making my room more minimalist. The catalyst for this being a love for simplicity and the beauty within it. Coming back from holiday I want any future moving to be as easy as possible. Clutter causes stress and distractions on the...


Strength

Our deepest fear is not that we are inadequate. Our deepest fear is that we are powerful beyond measure. - Marianne Williamson Ok so going a bit deep with this post, but I think it’s worth sharing. Some realisation of this started with going to...


PintBet

Pintbet logo and strap line on the home screen. Users screen with ‘sparkline’ graph showing profit trend. Events Screen Tip Screen


Unlearn Your MBA

David Heinemeier Hansson does it again, more inspiration for doing your own startup. He’s real.


The Dissertation

Yeah… that little thing. I wanted to produce something that would be useful and new, not a rehashing of what has been done before, something cutting edge in web design / user experience, etc. It turns out this isn’t really an option, and a rough proposed topic...


wikidtutorials

This was a concept for a collaborative user-created tutorial site (and still a good idea), hence the wiki.


ur.gigs Website

This was produced as part of a university assignment - A user contributed gig review site built in PHP and using the last.fm API.  I went with a simple, and clean visual style.


hackrhackr Logo

The logo compromises two abstract h letters. Inspired by symbols from The Matrix.


subscribe via RSS