Tiberian Sun XWIS Relay

I’ve been repeatedly asked by many people to bring back relays to the Command and Conquer community. For non-malicious purposes, relays can be useful and hopefully able to spark a little life back into a dying community. A relay (in it’s simplest form) is nothing more than a communicator that “relays” information between two systems. [...]

Migrating nodes from Drupal 6 to Drupal 7

(attow) Sadly, there doesn’t seem to be a straight for method for importing content nodes from Drupal 6 to Drupal 7 without installing a module. Hopefully, this small snippet will assist in filling the void. There are a few caveats however. Forewarning: This snippet requires the use of Node 1 but, can be replaced/removed post [...]

Creating a new vhost in Apache

Below are a few sequential commands you can use for creating a simple name-based vhost for apache2. I plan to revisit this post to add/clean it up sudo mkdir /home/User/example.com sudo mkdir /var/log/apache2/example.com/ sudo touch /var/log/apache2/example.com/error.log sudo touch /var/log/apache2/example.com/access.log sudo nano /etc/apache2/sites-available/example.com <VirtualHost *:80> DocumentRoot /home/User/example.com ServerName example.com ServerAlias www.example.com ServerAdmin admin@example.com <Directory /> Options [...]

Securing HTML hidden input fields

Input fields of type “hidden” are non-interactive form elements that are not rendered by the browser (remaining “hidden” from the user). This type of input element represents a value that is not intended to be examined or manipulated by the user. Its sole purpose is to facilitate data round-trips from and to the web server, [...]

Tiberian Sun Filter 3.01

Tiberian Sun Filter (TSF) is an “add-on” for Command and Conquer: Tiberian Sun that enables a user to cross reference players in real-time. Due to the absence of serial validation, users can create an unlimited number of accounts on XWIS. In cooperation with the XWIS Player Index (XPI), TSF can auto-detect additional nicks and promptly [...]

Retrieve total number of rows while using LIMIT

Every now and then you need to limit the number of rows MySQL returns, i.e. use the LIMIT clause. Result set pagination is by far the most often usage of LIMIT clause, since you usually want to select only rows you’ll be displaying on certain page. The problem is that for pagination you also need [...]

Simple PHP Standalone Pagination

This is a simple pagination snippet I wrote for a Drupal module I was working on. I’ve unDruaplized it and now it’s completely independent. The function will calculate the number of pages to display based on $total and $shown. In addition, it’ll append the corresponding page number to the provided $url. NOTE: All page numbers [...]

HTML Limit Textarea characters with countdown

Recently for a personal project, I had a need to delimit the number of characters users where able to input into a certain comment box ( textarea ). At the same time there needed to be some type of notification to the user of how many characters they’ve used until they hit their limit, which [...]

Installing World of Warcraft on Linux via Wine

First hurdle: Original WoW Install This will give you problems because the installer.exe on the disc is a hidden file. But the reason it’s a problem is that it’s a Windows hidden file, not a Linux hidden file. Most people will tell you to simply mount the CD or DVD using the “unhide” option, but [...]

PHP Echo vs Print

this was a post i made some time ago on hawkee.com and thought it would be a nice subject to debate here. in my opinion, it really depends what your trying to accomplish that will determine which you should use. some things you should consider: 1) echo() is marginally faster than print() 2) print() behaves [...]