Have you ever wanted to generate a random string in MySQL, say for assigning a random password to a list of users? Well here is a useful tip!
I spend most of my life being a geek so I thought I'd share some of the stuff relating to being a geek.
Following my previous post about configuring Lighttpd on this VPS Webserver to replace Apache I bring you a guide to configuring AWStats under Lighttpd. This process is differs to Apache as control of directories and aliasing is handled differently. There can also be complications if you have previously enabled the Drupal LUA Magnet script on your site for clean URL handling!
This afternoon I needed to rename a bunch of files from one form to another in a command shell… Well technically I didn't need to do it in a shell - but, as sure as there is a hole in my ass, I wasn't gonna go through renaming them all manually!
They needed to go from, for example,
add_32.png. After a little research into commands like
bison and so on - I suddenly realized that '
cut' held the key!
Every blog worth its weight needs a Facebook page!
Lets see how many fans I get! This is also a test in a way. I wanna see if Facebook could provice any kind of useful traffic.
I've recently been noticing a trend in how other websites are handling Clean URLs and it isn't good! Most websites don't appear to have the same luxury we have with Drupal (a concrete URL Alias system provided by the Path module). Although the URL Aliases can sometimes be a bit of a burden on larger sites, as the table can easily enter the tens or evey hundreds of thousands of entries, it provides (if used correctly) a very effective 1:1 relationship.
Following on from my previous post about how to check how many apache processes are running - I recently wanted to find out exactly how much memory my applications where using… So I did a little research and found a few new and useful commands!
Recently at work we had been having issues with spiking server load. One of the potential suspects was the Apache configuration as it was allowing 256 MaxClients. Combine that with Drupal eating RAM for breakfast (say a minimum of 12Mb per page) and you have a recipe for disaster - too many visitors cause a RAM shortage, lots of swapping and eventually a server meltdown. After speaking the Rackspace Technical Support Team, one of the guys there (Daniel) wrote a VERY useful script for us to run on the server to monitor Apache usage.
I recently looked into which versions of software I was running and was a little concerned to see how backward Fedora Core 4 was in some areas. I did a little Googling around and found a website (http://remi.collet.free.fr/) which is predominately written in French (but has a few English translations) which provides a new repository for Fedora Core 4's Yum Installer Package which provides far more recent RPM's for the likes of PHP and MySQL... So I installed it!
I recently needed to find out a list of modules which used
hook_cron. I have SSH access to my server. Instead of writing a module (or using devel to execute some PHP) which returned the result of module_implements, I turned to
cd into your modules folder (can be the Drupal install, but you end up recursing through unlikely folders) and run this:
grep -R "^function.*_cron" *module
I recently needed to remotely copy over SSH a folder from the remote machine to my local machine. Usually this is not a problem, however the path to this folder had a space in it. The folder itself is rather large and contains files which wouldn't really benefit from compression. It turns out the solution was quite simple.
After looking through the list of mentors for this years Google Summer of Code I noticed that I have been paired up with a fellow Drupal-eer called kkafer for the project we chose to mentor (I'm probably not allowed to publicly say yet, so I wont). Anywho - in a quest to find out a little more about this 'German gentleman' I decided to pop over to his Blog and, while having a little read through, I found that he'd bloged about this YouTube video regarding the difference between Web 1.0 and Web 2.0.
This morning I decided to watch the Lullabot Drupal 4.7.x to 5.x Conversion Tutorial. Thing is - my work PC doesn't have sound plus it's not ideal to watch a video and work on the same screen - not enough screen real estate.
This morning I am faced with a task that will involve repeatedly dropping and reimporting a lot of data. MySQL has
DROP TABLE and
DROP DATABASE but there is no command to drop all tables or truncate the database.
We use NTL at home and recently they have been quite inconsistent when it comes to speed. Fair enough, when they upgraded us for free from 2Mb to 4Mb, I can accept a little slow down while the techies get on and sort the network out - but since friday our internet connection has stopped me from getting to one or two of the sites I works with, including this one! The one I was most concerned about was www.sportbusiness.com which was recently moved onto a new server over the weekend. Just when I needed (not wanted, NEEDED) to get to it - NTL stop me getting there.
- 2 of 2