Hifivr.com – free flash games arcade

Hifivr.com is a small side project i’ve been working on lately and consists of free online arcade style games. It has over 60,000 games from publishers such as mochimedia amongst others. I plan on creating a custom theme and working with multiple publishers to get some exclusive games on it.

I will update this post a little more as things start to develop.

Lemonstand product & category throw 404 if not found

Lemonstand weirdly does not come with a way to configure it’s dynamic pages such as categories and products to throw automatically throw a 404 if the product was not found.

I solved this with the following simple snippet. Initially just added to the post_action.php for both the category/ and product/ pages.

if(!isset($product)){
  $params = array();
  $page = Cms_Page::findByUrl('/404', $params);
  header('HTTP/1.0 404 Not Found');
  Cms_Controller::get_instance()->open($page,$params);
  exit;
}

if(!isset($category)){
  $params = array();
  $page = Cms_Page::findByUrl('/404', $params);
  header('HTTP/1.0 404 Not Found');
  Cms_Controller::get_instance()->open($page,$params);
  exit;
}

An improvement to this could be to wrap the 404 throwing into a function provided by a custom module and then just keep the logic behind throwing the 404 in the relevant areas of the site. In this case I just couldn’t be bothered…bite me.

A quote of inspiration: Waves

I came up with this the other night, no idea whether it’s original or not, but, i’m sure as hell going to claim it so, until proven otherwise.

In an ocean there are many waves, of these waves only few make it ashore, even fewer leave a mark. Leave a mark.

Edit*

In an ocean there are many waves, of these waves few but make it ashore, even fewer leave a mark. Leave a mark.

If – a poem written in 1895 by British Nobel laureate Rudyard Kipling

If you can keep your head when all about you are losing theirs and blaming it on you, if you can trust yourself when all men doubt you, but make allowance for their doubting too; if you can wait and not be tired by waiting,or being lied about, don’t deal in lies, or being hated, don’t give way to hating, and yet don’t look too good, nor talk too wise: if you can dream – and not make dreams your master; if you can think – and not make thoughts your aim; if you can meet with Triumph and Disaster and treat those two impostors just the same.

If you can bear to hear the truth you’ve spoken twisted by knaves to make a trap for fools, or watch the things you gave your life to broken, and stoop and build ‘em up with wornout tools: if you can make one heap of all your winnings and risk it on one turn of pitch-and-toss, and lose, and start again at your beginnings and never breathe a word about your loss.

If you can force your heart and nerve and sinew to serve your turn long after they are gone, and so hold on when there is nothing in you except the will which says to them: ‘Hold on!’

If you can talk with crowds and keep your virtue, or walk with kings – nor lose the common touch.

If neither foes nor loving friends can hurt you, if all men count with you, but none too much; if you can fill the unforgiving minute with sixty seconds’ worth of distance run -yours is the Earth and everything that’s in it, and – which is more – you’ll be a man my son!

Git diff only show file names with changes

If you just want to see a list of files with changes in the .git repository you are in then just fire terminal up and run the following command.

git diff --name-only

For a more detailed view of all changed files:

git diff

For a detailed view of just one file:

git diff application/routes.php

Show all un-committed / un-tracked files

git ls-files --other --exclude-standard

Undo the last commit

git reset --hard HEAD^1

All pretty useful git diff commands.

The new year

As 2013 gets well underway I took a quiet minute to reflect on the year gone by and all that lays ahead in 2013.

2012

2012 was a roller coaster year, full of some tremendous highs and the lowest lows – by all accounts it was an interesting one.

In business I guided my company Bytewire Ltd to it’s most successful year to date, gaining more clients and generating more revenue than any previous year. Alot of big wins we’re made and alot of lessons learnt. With long hours and much effort we managed to turn around alot of projects for a very small team and all the while improve my own coding ten fold. I learnt new languages, played around with new techniques, built out my own servers, and got to grips with more than one E-commerce platform.

Personally 2012 taught me alot about myself and what i’m capable of if I just remain dedicated, hard working and driven. There is alot to be said of those that grab each day by the reigns.

A couple of important lessons i’ve learnt this year:

  • Life’s too short
  • Change is good
  • Be a little selfish when it comes to your development and career, push for what you want!
  • Don’t let people play your ideas down, be heard, but equally listen to the opinions of others just as you wish yours.

2013

2013 holds alot in store for me personally and i’m excited about the challenges it will present. I’m looking forward to moving out from my parents place, getting fully back into football (after lengthy time out with a broken leg) and getting to new places around the world on holiday. All the while i’m as always excited by the prospect of new creative and interesting projects that both challenge and push my professional abilities.

This years all about reading more and learning more – particularly looking forward to getting into mobile at the end of the month.

2013′s bucket list

  • Sky dive
  • Fly somewhere further than 6 hours away
  • Go boarding (not been since broke my leg)
  • Volunteer for an animal charity
  • Be a film extra

I’m all set to make 2013 my bitch. So…until next year folks…have a great year.