Software Woes

Rants, tips and tricks



Saturday, July 11, 2009



CodeIgniter woes

I started using CodeIgniter some time ago, and here are the problems I'm having:

- nuking of $_GET does sound reasonable, but it makes problems when you want to integrate with some other service like RPX for example. I "fixed" this by writing a small php script outside of framework to take the GET request and turn it into URL acceptable by CI

- The settings for Apache rewrite rule you'll find first is soo wrong. I mean, it is correct, but it creates a hell of a lot of problems when you want to do something outside of the box. Basically, you have to "allow" anything outside of CI (even images, javascript and css) to be accessible. The alternative snippet I found is much better (it basically says: if it's a real file, fetch it, if not, route through CI):

RewriteEngine on
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]


...more coming as I build my first serious CI-powered application.



Friday, July 03, 2009



Staying up to date with slackware-current

Here's a nice script I use (I did not write it myself):

#!/bin/bash
#
# Check slackware-current
#

# Where to download from
# should script it so that the different sources can be listed and
# selected from the command line
SOURCE="rsync://slackware.mirrors.tds.net/slackware/slackware64-current"
# Change as necessary
OPTIONS="-avzP --delete --delete-after"

EXCLUDE="--exclude=pasture --exclude=kdei \
--exclude=zipslack"

DEST="/home/milanb/arhiva/install/distre/slackware/current64/download/"

case "$1" in

"-c" )
echo "Checking..."
/usr/bin/rsync $OPTIONS $EXCLUDE --dry-run $SOURCE $DEST
;;

"-d" )
echo "Downloading..."
/usr/bin/rsync $OPTIONS $EXCLUDE $SOURCE $DEST
;;

* )
echo "Usage: `basename $0` {-c|-d}"
echo -e "\t-c : Check for updates"
echo -e "\t-d : Download updates"
exit
;;

esac

######################################################