Smiley Happy Coder

I'm a web developer with a love of technology and I'm a bit of an Apple geek

A required skill for an internet age.

All too often and I mean ‘too’ often, I get asked a question. Now before you go off and shoot me down for being a complete a*se I certainly don’t mind helping people but there are a couple of things that are just plain lazy. Finding answers is a required skill these days.

One of the more annoying types of questions that comes to mind is asking something again and again. Read On >

Add SSH keys to your Mac or Linux machine

If you’re using a server such as Github or Nitrous it stands a fair chance that you’ll have to add SSH keys and supply these services with your public key.

A good explanation of SSH keys can be found on Wikipedia

Before we add ssh keys, do you already have any setup?

Read On >

Adding the Post ID to the WordPress Admin area

In a large complex WordPress installation you can sometimes have a lot of pages and posts and sometimes it becomes hard to find anything. Being able to find a post by post ID in the admin area could be a bit benefit.

I’ve recently been working on a WordPress site that has over a hundred pages Read On >

Find the ID of your home page in WordPress

Today I needed to find the ID of my home page in WordPress.

I spent a while looking in the codex and in the forums and all I found were a few unanswered posts.

It must be stored somewhere

Well as you’d imagine the ID of the home page is indeed stored in your database.

Logic dictates that it would be found in the options table and indeed it is.
Read On >

Externally connecting MySQL in Vaprobash

This post is more of a note to myself than anything else.

This is becoming a trend for my blog, posts that are only of use to me, but still…

Read On >

How to remap keys on your mac

Ever since I got my first mac one of the biggest frustrations for me was the hash key or pound (#) for the folks in the US.
I decided pretty qucikly that I needed to remap keys, but the question was how.

Being a web developer I use the hash quite a lot. Particularly for CSS and PHP comments. Today I finally got around to doing something about it.
Read On >

Installing Emmett (Zen Coding) on sublime text 3

There are many articles out there that tell you how to install Emmett but a lot of them miss a massive chunk.

The instructions for installing emmett always start with “Install package” but out of the box, that option just isn’t there.
We have to add it first.

Installing package control

In Sublime open the console by pressing
Read On >

Multiple environments with Laravel

Environments can be a very powerful and quite often nessesity for any applciation and they are made very easy in Laravel.
In my case I need to consider such things as database connections and Stripe keys.

In my workflow I have three environments.

  1. Development
  2. Staging
  3. Production

Read On >

A Laravel csrf Nugget

My good pal @limeblast popped up with a really nice little Laravel csrf nugget the other day.

Add this to the top of your Routes.php file
Route::when('*', 'csrf', ['post', 'put', 'patch', 'delete']);

Now, provided you user the form fa├žade open method, each and every form will be protected from CSRF.

Calling jQuery, http, https or //

Over the years I’ve seen this issue a few times, yesterday I was reminded of it so I thought I would have a dig.
The problem is that when you call an external JavaScript file from, say a CDN, on a secure page you’ll often see an error.

Calling jQuery

Read On >

Having problems installing Laravel on shared hosting? A few pointers

This post is mostly for my own benefit I have to admit.

Laravel on shared hosting

When I’ve set up Laravel on shared hosting in the past I’ve come up against the odd issue.
Read On >

Laravel 4 gotcha

Today I was chucking laravel application onto my server to test it, and I encountered a problem.

Such a simple issue but it could take an age to find.

It worked locally, why won’t it work on a live server

Read On >