Author Archive
Installing and Configuring Eggdrop on Debian
An eggdrop is a popular IRC bot that handles users and maintains certain rules & other things on your IRC channels. Eggdrops are useful to have on networks that don’t have IRC services such as Efnet and also useful when you need a certain service such as 24.7 channel logs for statistics (pisg) or quotes [...]
Rapidswitch; My Dedicated Server Review
In this post I thought i’d just write a quick review of my old dedicated server provider; Rapidswitch.
Upgrading Debian Etch (v4) to Debian Lenny (v5) and Kernel 2.6.26
Well, seeing as Debian Lenny is almost about to be released, I figured upgrading my server wouldn’t be a bad idea. Its locked behind a NAT firewall and doesn’t really do too much so I don’t think it will be a security issue (especially considering Lenny is soon to be a stable release.)
TCL Substring, How do you do it?
At first I was a bit confused on how to achieve a substring in TCL. Its not very clear and its not well documented, but in the end I found it.
Here is it:
set string "This is an example string"
putserv "PRIVMSG #channel :Example: [string range $string 0 4]"
# This would message #channel with "Example: This"
# Remember: [...]
Connecting to MySQL using TCL
So, lately i’ve been playing around with tcl again, and trying to make it work alongside MySQL to store information such as Q auth’s and various other information on users. Its working quite well.
We connect to MySQL through TCL using a package called mysqltcl.
Here is how I connect:
# First we require the mysqltcl package. You [...]
Convert time (hr:min:secs) into seconds
I wrote this snippet to convert ffmpeg’s information output time into seconds, i can then determine the 25, 50 and 75 percentages to create 3 different thumbnails of a movie (using ffmpeg also).
Heres the snippet:
function time2seconds($time=’00:00:00′){
list($hr,$m,$s) = explode(’:', $time);
return ( (int)$hr*3600 ) + ( (int)$m*60 ) + (int)$s;
}
Hope you find this [...]
Automatically Version your Javascript & Stylesheets
Recently, I was browsing the internet, as you do, and I came across a great little article that discussed the automatic versioning of stylesheets, javascript, flash and image files.
As i constantly have to hold shift when refreshing to get a full page refresh, I decided this method was genius and decided there were a few [...]
Benchmark your PHP code
As a developer I often question myself when I have many occurrences of a function that could be replaced by something else. There are often many ways of achieving the same thing and only opinion standing in the way of a decision.
To solve this problem, I often benchmark certain peices of code multiple times to [...]
Managing Apache2 on Debian Etch
Thought i’d write a quick guide on managing apache2 once installed and running under debian.
Covers log file management, adding virtual hosts (with subdomains) and basic security.
Swear Words Text File Resource
When browsing the internet today I found it impossible to find a neat list of swear words in a basic text file. Upon discovering their was none available I decided to create my own for my users and upcoming projects.
