Smiley Happy Coder

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

A little help debugging Laravel sql queries.

One of the problems with these new fangled frameworks is seeing what actually happens in the background.
Sometimes you just need to see what sql queries are being run, so here is a quick snippet for you.

Pop open your global file

Read On >

Quick Laravel helper to generate Gravatar image

Looking to add a Gravatar image to your Laravel application, of course you are.

Gravatar helper code

If you don’t already have a helpers file go and create one.
Create it in the following folder

Read On >

Aliases, how to configure them in your termial

If you develop on a mac or linux machine you will almost certainly enter the same terminal commands over and over again.
If you haven’t already you should probably set up some aliases.

Read On >

Laravel Environment Detection

One thing you’re almost certainly going to run into quick quickly in your Laravel career is environment detection.

Laravel users environments so that you can really easily set up differing configurations depending on your live or staging or local environments. The most basic example is database connections.

Read On >

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 >