Categories
Coding

An easy way to search and replace domain names in database records

Recently I had to move a WordPress site from one domain to another (‘beta’ to ‘www’), when using the Media tool, it automatically adds the current full site URL to the post database records. This is a very useful SQL snippet to do a full search and replace on the wp_posts table. update wp_posts set […]

Categories
Apps & OS's Coding Technology

Installing the latest version of Ruby & Ruby On Rails on MacOSX (using RVM)

Installing Ruby (the latest version) and Rails (using RVM) on MacOSX is rather easy, this quick post will run you through installing Ruby and Rails using RVM (Ruby Version Manager) which apparently what all the ‘cool kids’ use to install rails with etc. By following these few simple steps and you should be up and […]

Categories
Coding

How to convert a multidimensional array to an object in PHP

Today I was working on creating an object from an array of data, I didn’t want a full blown class as I was only accessing the data as application settings  and thankfully due to PHP’s stdClass class this can be easily achieved like so:- $obj = new stdClass($array); or like… $obj = (object) $array However, problems occur […]

Categories
Coding

Creating *NIX user accounts without need for a password prompt!

It is likely that in future I will be implementing SSH access and generally changing the way that users are handled by ZPanel (on the *NIX platform). Currently all user accounts across ZPanel are ‘virtual’ accounts and not system accounts and for various reason’s I may want to change this in future. I have written […]

Categories
Coding Technology

Enable auto-completion for CodeIgniter development in NetBeans 7.2

I thought I’d share up this very useful script that I found today, I guess that as you’re viewing this page you want to enable the lovely code auto-completeion features that NetBeans supports and as by default you’ve found that NetBeans doesn’t support this for CodeIgnitor. So here’s the fix:- Download netbeans_autocomplete_codeigniter file (Contains mainly PHP […]

Categories
Apps & OS's Coding

Installing APC and Memcached on Ubuntu 12.04 with nginx

Following on from one of my previous posts (Installing nginx on Ubuntu 12.04 as a high performance web server) I have installed APC and Memcached on my Ubuntu 12.04 server It’s very simple to do and well worth it:- apt-get install php-apc Now restart your PHP FPM service like so:- /etc/init.d/php5-fpm restart You can confirm […]

Categories
Coding Technology

Installing Tomcat 7 on MacOSX

I’ve made the switch over to Apple on my development machines and as I’m starting my new company soon I’ve got myself a new MacBook Pro machine of which I will be transporting to and from the office so I’ve been installing my entire development on it and thought I’d blog about how to set-up […]

Categories
Apps & OS's Coding Technology

My new MacBook Pro arrived today!

We’ll I’ve treated myself again, mainly to be used for my ‘company’ work when I leave my current job in September… I’ll be leaving to work for myself and have a couple of projects on the back burner and a few customers already which is great! – I did this for my iMac so I […]

Categories
Apps & OS's Coding

Two nice themes for NetBeans

Previously I used to use Notepad++ for development but over the past couple of years I’ve grown to love NetBeans and all the awesomeness of it (such as the source completion, code formatting etc. etc.) I do however miss the nice IDE themes that came bundled with NotePad++ so I did a search around the internet […]

Categories
Apps & OS's Coding Technology

Installing a Git (gitosis) server on CentOS 6.2

After recently changing my personal VPS over from a Ubuntu 11.04 system to a CentOS 6.2 I needed to setup a new git repository server of which I will be using for all of my private git repositories instead of hosting them over at Github, Github is perfect for all my open-source (non-private) project but […]