Skip navigation.
Related Links
programming
Syndicate content

Programming

As a programmer by hobby and by job, I stumble across a lot of resources for programming, from websites to gaming competitions.


Generate random string in MySQL

10
Jul
2008

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 usefull tip!

Global Redirect Update

03
Jul
2008

Global Redirect Logo

One of my most popular Drupal modules - Global Redirect - has just had an update from 1.2 to 1.3. This update includes several fixes for the following:

Page Title 2 for Drupal 6

02
May
2008

I've just released Page Title 2 for Drupal 6. Page Title 2 is still marked as Alpha (as a project) however its in use on a number of my sites and appears to work.

I'd appeciate people's feedback regarding this module. Its a GREAT way to improve your websites SEO!

Node Quick Find

06
Apr
2008

Node Quick Find ScreenshotI've just committed another module - Node Quick Find. That brings my projects to a nice round 10!

This module is a pretty basic one though. It simply provides a block which has an autocomplete field. This field is linked to the Node Title field. You start typing the Node Title and it will start suggesting possible nodes you might be interested in - sort of like a primitive search box.

It features primitive configuration, allowing an administrator to easil configure the title of the prompt, the size and the types of nodes returned in the autocomplete list (eg, you may want to limit the list to blogs only).

Accessing the Fragment from PHP - is it possible?

22
Mar
2008

peashoter has raised a good point in an issue report for GlobalRedirect. What happens to a URL which has a fragment in it - such as:

http://www.example.com/node/100#comments

I have done a google and cant find any answer to this. It appears that the fragment is not passed to PHP. This makes it a LOT harder to fix!

Call to arms (for Windows Drupal Developers)!

01
Jan
2008

Gobal Redirect LogoIt has come to my attention, thanks to Hass, that GlobalRedirect apears to have issues when running under Windows web server, IIS. Unfortunately, I do not use IIS but I am aware that a few members of the community do.

How much memory am I using?

08
Nov
2007

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!

The price of sucess - too many users!

25
Oct
2007

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.

Hidden Drupal development functions

02
Oct
2007

I was browsing around the Devel Module the other day and I noticed a few functions that are not mentioned in any documentation that I've seen but make life even easier, as if Devel doesn't make it easy enough! Almost everyone that's used Devel will be familiar with dprint_r (A debug version of the popular print_r function in PHP). Well who has used these ones?

How to weigh terms alphabetically

07
Aug
2007

Mysql And DrupalFollowing on from my Numbering Rows in MySQL article, today I needed to populate the weight column of the term_data table for about a hundred terms so that they incremented in alphabetical order. This was, on the face of it, a very tedious task; click edit, select weight from drop-down, submit, 'goto 1'.

As I said in my Numbering Rows in MySQL article, I don't like tedious - but I do like over-complicated methods which actually make my life more interesting and less tedious... Enter a nifty MySQL script!

Force a PDF to download

06
Aug
2007

Apache HTTP Feather LogoI recently needed to force a PDF to download using Apache. The default behaviour for most browsers is to try to open the PDF inside the browser itself. This is fine for a small PDF or for powerful machines - but a large PDF on even a modest machine can often lock the browser up. This needed fixing!

After 20 minutes of perusing the Apache documents, I happened across the FilesMatch option which takes Regular Expressions. Regular Expressions are cool things which pattern match; you give it a rather complicated (yet logical) pattern and it matches it for you. Initially I used something like this...

Sprucing up your User Profile Pages

12
Jun
2007

I recently launched a Drupal Codebase site for a programming community and wanted to have the user profiles to be more than just a "signed up on..." and a Tracker Tab. I wanted them to have structured and customisable blocks, dynamic content, a Peer to Peer Message Board (almost finished)... I can have my dreams cant I?!

I recently wrote a book page on how to programmatically create a view. I wanted to do this as it would allow to me control almost an entire website with multiple content types, terms and users (as well as combinations of the three) along with RSS feeds - all powered by the Views Module + a bolt on module consisting mostly of a menu callback and a function to make and configure a view. This worked pretty well for a first try and principle test!

I then realised - hey, if you can do this with Views - why cant you do it with Panels too? Panels are fantastically useful for structuring multiple blocks, views and nodes onto a page. So I tried… And you can!

New Drupal Site - Codebase

06
Jun
2007

Today I officially launch a new Codebase for Dark Basic Pro. I'm a big fan of Dark Basic Pro and this Codebase is one of the ways I'd like to help the community back. There is a codebase which The Games Creators provide and it is a good codebase with a LOT of content. This codebase, however, offers more  "Web 2.0" features such as free tagging, comments and rating (and I've only just got started - more to come!).

Codebase Large Banner

My first project using Ogre

20
May
2007

With some help from a good friend, I took my first steps into game-making using C++ last night. I used a graphics engine called Ogre3D and tried to mimic a game I started making in Dark Basic Pro a few weeks ago. To my astonishment, within a few hours I'd managed to replicate the basic layout of the game using tools which cost absolutely nothing!

Which modules use hook_cron?

14
May
2007

Drupal Grep

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 Grep. Simple 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

From Russia without Love

08
May
2007

Spam with Chese

I've recently been receiving some spam from some Russian IP's. As each spam attempt was from a different IP, blocking individual ones was a little futile and time consuming. I did a quick google and ended up at Deekayen's website as it seem's he has had similar issues. His solution was an Apache level "Deny"… My sollution uses iptables.

Drupal gets a $100,000 injection thanks to Google!

12
Apr
2007

Google announced today that it will be sponsoring 20 - yes twenty - projects for its Google Summer of Code program this year. From what I've seen, Drupal is one of the top "winners" if you use project quantity as a metric, with only Apache and KDE beating us (I couldn't see any others with any more at a glance). We got more than Joomla, PHP & The Mozilla Foundation and I believe this is a real achievment.

I'm also thrilled that Konstantin Käfer and I am mentoring one of the projects this year - the Taxonomy Manager.

Pongis

20
Feb
2007
Pongis Screenshot Thumbnail

I've just released a new game - its a VERY simple adaptation of the classic, pong, but it has a twist in the form of tennis. You must rally the ball back and forth - the ball gaining speed slightly on every return. Players win points (and serve) by knocking the ball past their opponent, either through a cunning move or by making them lose out in a game of reactions.

Checkout the game here - Pongis - Where Pong Meets Tennis

Cloggy's D3D Plugin

14
Jan
2007

I just found this plugin (again) on The Games Creators Forum. Basically it adds new features to Dark Basic Pro. I'd used an older version of it but this one seems to have plenty more! Hopefully I'll put the project I'm using it for up soon - a resource management game

Programming Quotes

10
Jan
2007

I found this site with loads of funny and appropriate (for any programmer or developer) quotes on it.

Programming Quotations

There are some absolutely fantastic quotes on it…

Ordering Menu Items Alphabetically

02
Jan
2007

Faced with a tedious task of ordering a set of rows using a weight column? Don't want to type the numbers out? Would rather find a difficult but more interesting method? I have the answer for you!

Christmas Coding Challenge

22
Dec
2006

Find it at The Games Creators

As many of you may know, I'm a BIG fan of Dark Basic Pro and this christmas the coding challenges are doing something a little different - a challenge that's allowed to use MEDIA an also has a prize other than setting the next challenge… A custom bitmap designed by a professional designer!

The only media that you're allowed to use is this festive smily…

Festive Smily

Fireworks Screensaver

06
Nov
2006

About the screensaver

This started out as my entry for the Fireworks Challenge and I decided to build upon it to make a screensaver of it. Its pretty simple - no sounds (sounds in screensavers annoy me!), a city made of white boxes and brightly coloured fireworks

The challenge was actually back in June 2006 and its only recently, with fireworks going off outside, that I've decided to finish it!

3D Gravity Screensaver

31
Oct
2006

About the screensaver

This is a game I started earlier this year (about June 2006) and - as is usual for me - I didn't finish it. Well now its certainly closer to being finished! A working screensaver with mesmorizing balls whooshing everywhere.

Drupal 5.0 beta 1 released!

31
Oct
2006

Drupal 5.0 beta1 has been announced.

It comes with many new features, including a web-based install system, improved administration tools, and a shiny new theme! There are also tons of under-the-hood improvements, such as the inclusion of the jQuery JavaScript library, node access system improvements (ACL), and many improvements to the Form API.

read more at drupal.org

Drop all tables in a MySQL database

10
Oct
2006

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.

Announcing: Global Redirect Module

08
Oct
2006

Well its nearly 1am - but I've just submitted by very first Drupal module to the community

http://drupal.org/project/globalredirect

Basically, if you have an alias for a node then it will redirect you to the alias if you try to access the node directly… The best example is the site it was designed for. At Sportbusiness.com you could access a news story by:

GraviKill

16
Aug
2006

About the game

GraviKill started out as an experiment with the effect of a gravity field on a moving item. When I found you could get really cool sling-shots from the formula, I thought "What if I tried to fire something from A to B but it got effected by pushes and pulls in between?"… and thus GraviKill was born!

AttachmentSize
GraviKill3.52 MB

Primitive Maze

13
Aug
2006

About the game…

This is a game that started out as a personal challenge - "How hard is it to make a random maze?!"

AttachmentSize
Primitive Maze - Self Extracting EXE2.27 MB
Primitive Maze - Sourcecode52.99 KB

Dodge The Fart

30
Jul
2006

About the game

This is a game I started over a year ago and never really got around to finishing. Well now I decided to actually try to finish a game! With the help of The Game Creators forum (a special thanks to "Freddix" for compiling The Ultimate Shader Pack AND creating the eXtends plugin for Dark Basic Professional) I have managed to not only improve the games efficiency but I have also given it quite a bit more eye candy too!

AttachmentSize
Dodge The Fart1.65 MB

It'd be nice if you asked before taking stuff from my site. Contact me at webmaster [at] thingy - ma - jig . co . uk

This site was based on the Cobalt 2.0 Theme for phpBB written by Jakob Persson

Free MiniMac

Free MiniMac

Social Statistics
Search
Google



Weblinks

Add to Technorati Favorites

TGC Webring

CMS Drupal Showcase

Feedburner for ThingyMaJig

View Nicholas Thompson's profile on LinkedIn

IconBuffet

Twitter

bile-edge