Saturday, October 15, 2011

Install memcached with PHP on Ubuntu 11.04

Memcached is a great tool for optimising your website.  It can be used to cache commonly used data in memory for fast access.  This can help greatly in increasing speed, reducing DB load and scaling your site.  To find out more check out the memcached site here.

Here is a short guide to installing memcached on Ubuntu.  This is a guide to installing via the command line but if you prefer a GUI you can install via the Ubuntu Software Center.

Open a terminal(Ctrl + Alt + T) and enter the following:

sudo apt-get install memcached

sudo apt-get install php5-memcached

sudo /etc/init.d/apache2 restart


to test memcached is up and running enter:

telnet localhost 11211

if it connects you are good to go.
*Note to quit telnet enter Ctrl + ] then Ctrl + d then enter "quit" and hit enter.

To test that memcached is working with Apache and PHP see the instructions here

Friday, September 9, 2011

Install Humble Bundle on XBMC Live

I recently purchased the latest Humble Bundle and wanted to get the games working with my XBMC Live setup.  I have put together this guide for setting up Humble Bundle 3 games with your XBMC Live setup.  This guide assumes you are using the install files provided as part of Humble Bundle but should work equally well for files downloaded directly from the game website.

I haven't finished writing guides for all games yet but I will add them to this post as they are published:

Install Revenge of the Titans in XBMC Live

Install Steel Storm in XBMC Live

Install Braid in XBMC Live

Install And Yet It Moves in XBMC Live

Install Osmos in XBMC Live


Have Fun!

Install And Yet It Moves on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing And Yet It Moves on XBMC Live.

Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo apt-get install libtheora0 libopenal1
sudo dpkg -i andyetitmoves_1.2.1_i386.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano andyetitmoves.sh

now paste in this:
#!/bin/bash
fluxbox &
/usr/games/AndYetItMoves
killall -9 fluxbox


Now press Ctrl+X and then Y to save and exit

chmod +x andyetitmoves.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

Step 5 - Fix profile saving bug
There is a bug in the config file of the And Yet It Moves installer so that your profile and settings will not be saved, to fix the problem do the following:


edit this file

~/.Broken Rules/And Yet It Moves/common/commonConfig.xml

and change "Company"  tag from "Broken Rules" to ".Broken Rules"

source ivl @ http://andyetitmoves.net


And that's it, you can now launch the game by going "Programs" -> "Launcher".

Install Osmos on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Osmos on XBMC Live.


Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo dpkg -i Osmos_1.6.1.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano osmos.sh

now paste in this:


#!/bin/bash
fluxbox &
/opt/Osmos/Osmos
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x osmos.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".

Install Steel Storm on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Steel Storm on XBMC Live.


Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo apt-get install libsdl-net1.2
sudo dpkg -i steel-storm-burning-retribution_2.00.02818_i386.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano steel-storm.sh

now paste in this:

#!/bin/bash
fluxbox &
/opt/steelstorm/steelstorm -basedir /opt/steelstorm
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x steel-storm.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".

Installing Braid on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Braid on XBMC Live.


Step 1 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 2 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo apt-get install nvidia-cg-toolkit


sudo dpkg -i braid_1.0.0-0ubuntu2_i386.deb

Step 3 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano braid.sh

now paste in this:


#!/bin/bash
fluxbox &
/opt/braid/braid
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x braid.sh

The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 4 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".

Installing Revenge Of the Titans on XBMC Live

I recently purchased the Humble Bundle 3 and have been setting up the games to run on my XBMC Live Box.  Here is a short guide to installing Revenge of the Titans on XBMC Live.


Step 1 - install Java
First follow my guide to installing Java on XBMC Live.

Step 2 - get the .deb file
Download the deb file from the Humble Bundle website.  You will need to transfer the deb file to the home folder on your XBMC Live box, my guide to using FileZilla to copy files to XBMC Live.

Step 3 - install the game
Open a terminal, see 3 ways to access the terminal on your XBMC Live box,  and enter the following.

sudo dpkg -i  RevengeOfTheTitans-HIB-18012-i386.deb

Step 4 - create launcher script
There are 2 ways to do this the command line way or the GUI way

The command line way:

mkdir scripts

cd scripts

nano revenge_of_the_titans.sh

now paste in this:

#!/bin/bash
fluxbox &
/opt/revengeofthetitans/revenge.sh
killall -9 fluxbox

Now press Ctrl+X and then Y to save and exit

chmod +x revenge_of_the_titans.sh


The GUI way:
Using FileZilla create a folder called "scripts" in the home folder on your XBMC Box.

Download this file and copy it to the "scripts" folder.



Give the file execute permissions, first right click and then select "File Permissions".  Check all the "execute" checkboxes and hit ok.



Step 5 - Add shortcut to launcher
Now you just need to set up a shortcut to the game launcher script in the XBMC Launcher Addon.  Follow my guide to Add a Shortcut to Launcher Add-on in XBMC to create a shortcut for the new script file.

And that's it, you can now launch the game by going "Programs" -> "Launcher".