Month: April 2006

  • Installing Ruby on Rails onto Debian Sarge with Apache 1.3

    After quite a bit of resistance on my part I'm afraid that it's time to get down with the kids, hence: Install ruby [code]apt-get install irb1.8 libreadline-ruby1.8 libruby libruby1.8 rdoc1.8 ruby ruby1.8 ruby1.8-dev[/code] Install gems [code] cd ~bealers/build/src wget http://rubyforge.org/frs/download.php/5207/rubygems-0.8.11.tgz cd .. tar zxf src/rubygems-0.8.11.tgz cd rubygems-0.8.11 ruby setup.rb[/code] Install Rails [code]gem install rails –include-dependencies[/code]…

  • Global search and replace using Vi

    to replace all instances of – say – 127.0.0.1 with 10.0.0.1 in a file then using vi you can do: [code]:%s/127.0.0.1/10.0.0.1/g[/code] if you mess it up then press u for undo. Of course if it's an important file then back it up first.

  • ssh logins without a password

    Share ssh keys: client: [code]cd ssh-keygen -t rsa[/code] the copy ~/.ssh/id_rsa.pub over to server server: [code]mkdir .ssh cat id_rsa.pub >> .ssh/authorized_keys[/code] Job done

  • MySQL Workbench

    I just downloaded MySQL workbench 1.06 beta. I stumbled across it after finding this message on the DBDesigner forum page: Dear DBDesigner4 users, Due to several attacks against the DBDesigner4 forum it has now been closed down.We simply cannot understand the sick motivation of people to attack Open Source projects.So please understand that we will…

  • Enabling spell checking within FCKeditor

    CMS Made Simple uses the great GPL WYSIWYG editor FCKeditor and I noticed this morning that it has a spell checking facility. To get it to work, I: Installed aspell on my dev server: [code]apt-get install aspell Reading Package Lists… Done Building Dependency Tree… Done The following extra packages will be installed: aspell-bin aspell-en dictionaries-common…

  • Adding arbitrary PHP to a CMS Made Simple website

    CMS made simple (CMSms) is great as it does what it says on the tin e.g. it's a CMS and it's easy to use and configure. Most importantly for me, it's easy to skin and modify. It uses Smarty as a template engine and I have to admit that I was dubious when I saw…

  • Clone a VMWare virtual machine

    Simple one, you have a windows virtual machine and you want to copy it: Copy the folder the VM is in (assuming you use a folder per virtual machine) and rename it to the new host name Click on the .vmx icon (you can rename this file first so it's new-host-name.vmx) Select “Edit this virtual…

  • debian start-up script tip

    If you've just installed something and want to make sure it starts on boot then the init.d script needs adding to the various run level folders as a symlink. It's a bit of a drag and it can be sometimes forgotten. Never mind, Debian comes with a handy script: Lets assume that we have a…

  • WordPress Widgets

    I'm a developer, I don't mind – in fact, no, I *like* – coding but when it comes to doing stuff on my own site I'm rather hesitant and I prefer things that Just Work out of the box. I installed a new theme K2 last night and whilst it looks good I did have…

  • Creating a separate VMWare hard disk for a Linux virtual server

    A mini How-To detailing how I created a separate virtual partition for my local dev server: I halted the virtual machine and then under VMWare settings I select Hard Disks then add. Once the disk is created and saved out I re-start the machine. Initally we have to partition the disk and make it a recognised file system. Once…

  • Using the Zend Framework – Part 1

    Edit: Sorry I never got around to finishing this, there’s only 2 parts of 3. For the past few years I’ve not really learnt anything new PHP dev-wise, mainly because I’ve been getting on with the task of running a business. Anyway, recently I’ve been bringing myself back up-to-speed with what’s happening at the leading edge…

  • Installing a new WordPress theme, K2

    If you’ve installed WordPress in the past then you will have seen the Kubrick theme. A lot of people who use WP end up keeping the original theme as it looks good, for example Cathie has done just this on her blog: http://ackers.bealers.com/. Bealers.com has been annoying me recently, the way it looks and the…

  • The Zend Framework – part 2

    I’ve added a second part to my of my Using the Zend Framework over in my How-To section. http://bealers.com/how-to/using-the-zend-framework-part-2/ Related: Part 1

  • Creating a subversion repository

    I wanted to add my Zend Framework example code to subversion but to do that I needed a local Subversion repository 🙂 As I had to figure out some of the bits how to this, I decided to put all of my steps into a mini How-To. Here it is: http://bealers.com/how-to/creating-a-subversion-repository/

  • Creating a second virtual hard disk for a linux server with VM Ware

    On my virtual Debian Sarge development server running within VMWare I wanted to create a separate virtual disk so that if I ever want to use the data on it with another virtual machine I can. Here’s the mini How-To: http://bealers.com/how-to/creating-a-separate-vmware-hard-disk-for-a-linux-virtual-server/

  • Installing CMS Made Simple

    Grab the code Option 1 – Subversion [code] cd ~bealers/www svn co http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk cmsmadesimple [/code] This checks out the entire project including a lot of modules into a folder called cmsmadesimple which may not be what you want, but it’s what I’ve done. Option 2 – Tarball Instead you could grab the tarball and extract…

  • Vim: Enough tabs already

    Scenario: You are connected to a Linux webserver via a Windows terminal client such as PuTTy. You copy some text to paste into a Vim document open on the remote machine and you get tab hell: Here’s an example of something I pasted in tonight: [code] ServerAdmin webmaster@host.some_domain.com DocumentRoot /home/bealers/www ServerName bealers.com ErrorLog /var/log/apache/bealers.com-error.log CustomLog…