Archive for 2009

Simple backup script for VMWare Workstation.

Simple backup script for VMWare Workstation.

| December 10, 2009 | Reply

There are more sophisticated ways of doing this, but here is a simple script I’m using to backup my virtual machines. It runs out of cron at 3am on Sundays. I also take snapshots of the VM before any major change.

Read More

Replace array key with new array key.

Replace array key with new array key.

| December 10, 2009 | Reply

I found that in my model, if the table columns were not explicity set, I ran into problems. This is the block of code I used to check an options array, and replace any non explicit table columns with explicit ones.

Read More

Recover files from Apple Time Machine backup on linux.

Recover files from Apple Time Machine backup on linux.

| December 8, 2009 | Reply

I was playing with a hackintosh for a month or so, and one of the neatest features it has is Time Machine backups. When I got sick of dicking around with MacOS, I threw linux back on my box. Then I mounted up the Time Machine backup drive and… hrmf. It is less than easy …

Continue reading »

Read More

OpenSuSE 11.2 Remote Administration (VNC) Black screen

OpenSuSE 11.2 Remote Administration (VNC) Black screen

| December 7, 2009 | Reply

In previous opensuse versions, it has been posible to enable vnc administration easily by enabling the service in YAST. In OpenSuSE 11.2, this option is still available, but does not work well by default. The issue, I believe is that the default window manager has changed to KDE4. Although KDE4 is the default window manager …

Continue reading »

Read More

CA Siteminder and SLES 10/11

CA Siteminder and SLES 10/11

| November 20, 2009 | Reply

CA Siteminder (And every CA product I’ve ever had the misfortune of using) is a steaming pile of shit. I mean that with all due respect. Considering the default installation package doesn’t work on stock SLES10/11, here are the hacks to make it work. Follow the normal installation procedure, which will fail when you select …

Continue reading »

Read More

JQuery to make a lazy filter (like iTunes)

JQuery to make a lazy filter (like iTunes)

| November 6, 2009 | Reply

This code is not mine, I’d link out to the source, but I’ve forgotten it. If you wrote this, thank you.

Read More

JQuery to show/hide elements and toggle between them.

JQuery to show/hide elements and toggle between them.

| November 6, 2009 | Reply

I have a form with a radio button on it to select from two different sets of options. Each radio button should dynamically load the correct set of options into a select box. Since one select box is filled with static options, and the other is filled with database records, using AJAX to dynamically populate …

Continue reading »

Read More

Codeigniter validation ( This field or that field, but not both )

Codeigniter validation ( This field or that field, but not both )

| November 6, 2009 | Reply

Codeigniter’s validation class is awesome, but I ran into a situation where I wanted to set a rule that said something like: Either Field A or Field B needs to be filled out, but not neither, and not both. To do this I used PHP and popped a custom error on the form_falidation error array. …

Continue reading »

Read More

Code content

Code content

| November 6, 2009 | Reply

I’ve added a new category to the site under the “Linux” section. This category is entitled “Code” and will hold snippets of code in various languages (Mainly BASH, JavaScript, and PHP). This information is here to help others, but mainly as a repository for my own use. Anyone is welcome to use or modify this …

Continue reading »

Read More

My Codeigniter CRUD Model

My Codeigniter CRUD Model

| November 5, 2009 | Reply

I’ve modified this model to be more portable by expecting an explicit database name.My_Model.php as requested in comments.  

Read More