This is something I developed for Train, The PM system requires that the user type in the username of the intended recipient , this is a perfect place to use Auto Completetion.
After a bit of searching i discovered that you can do auto completetion in rails, but it uses prototype, which aside from being obtrusive [...]
In this article i will show you how to create a simple javascript editor that inserts some content into a text area, in my case bbcode. Its sole purpose its to make using bbcode easier for the end user. It isnt a WYSIWYG Editor!
The first and most important part is the text area, this is [...]
Overlay boxes are poping up all over the place now, the most common use ive seen is to display a bigger version of an image when you click on a thumbnail.
They arent hard to create, all you need is 2 or 3 divs and a few lines of javascript, for a basic one. There are [...]
In a previous post I mentioned that Arcath.net was now using Train, my new RoR CMS.
Well I think now is a good time for a progress report.
I am picking up RoR quite quickly (it helps that i already knew ruby). Im not getting stuck when making new controllers etc… so development is speeding up [...]
My main website Arcath.net has now swapped to using Train. It is on the “cutting edge” of Train, in so much as it is Train. What you see there is Train up to the last time i touched restart.txt to have passenger re-load the app.
For more information please head over to the site, thats where [...]
Ive begun my next big project! Id like to say its my summer project, but im going to be working over summer and when im not im either going to be in a tent in the lake district or at i37 so writing ruby code will be a litle hard (although i do have an [...]
I have looked at Ruby on Rails in the pas, but hit brck walls when it came to running it with apache.
I recenelty came across something called Phusion Passenger (mod_rails). This lets you run rails inside apache! so its bound by all you apache rules. simply create a rails site in your usual place and [...]
Well this is a special post:
Its the first post involving something i did for work
Its the first post where the code is written in VBS
Its the first Windows based post
This is a printer script i wrote to replace a script some else had written for one of the schools i work in, his script was [...]
In a previous post i mentioned that i was going to write a database interface that the new bot would use, and here it is:
require ‘mysql’
class HsDB
def initialize(dbhost,dbuser,dbpass,dbname)
@dbc=Mysql::new(dbhost,dbuser,dbpass,dbname)
end
def query(q)
out=[]
out[0]=0
qa=q.split(” “)
query=”"
qa.each do |a|
if query != “” then
query+=”AND ”
end
query+=”`record` LIKE ‘%#{a}%’ ”
end
res=@dbc.query(“SELECT * FROM `records` WHERE #{query}”)
res.each do |row|
out[0]+=1
out.push(row[1])
end
return out
end
def add(record)
@dbc.query(“INSERT INTO `records` (`record`) VALUES (‘#{record}’)”)
end
def remove(q)
qa=self.query(q)
if [...]
Anyone who has poped into our IRC Channel (#whitefall on freenode) will have noticed that theres a new name thats allways there, “Beylix”. This is yet another bot, i know this is yet another bot, but i hope unlike the others ive made it wont just dis appear from use.
The underlying IRC Class is the [...]
The Latest Version of the Steam Gamer Card is now here!
This new version implements all the caching ideas i had come up with whilst making the other versions. So when the cacher is run (once every 10 mins at the moment) this process occours:
Load all the Steam Profile Links into an array
Download every profile to [...]
Ive written a script for my wind that sets my proxy for me on login. This script doenst set any proxy options other than the on/off setting, i only use proxy or no proxy so all the other settings remain the same. Its written in ruby (no surprise there).
This is the script:
#!/usr/bin/env ruby
#First job get [...]
As i said in my last post i am retiring the eee and getting an MSI Wind as a replacement. Well the Wind turned up on wednesday and i have to say im impressed. I really do like the Wind, the keyboard is small, but not too small, unlike the eee im not pressing the [...]
I have recently finished a new look version of the steam gamer card!
The card now looks like this:
The background is pulled in and then the information is simply placed on top of it. There is no change in how it functions, i have a couple of ideas on how to make it function better and [...]
Any of you that read the forums will have noticed a new project section entitled “Steam GamerCard”. This is for my latest project, that is an Xbox Live style GamerCard for Steam.
It uses your steam profile at the time that the image was requested, this means that it is able to show your current status, [...]
My IRC Bot Silverhold has for the past few weeks been storing all the messages received in its database. This means that now with a PHP page it is possible to generate statistics from the database. I am still in the process of writing the PHP to do this, but it is coming along nicely. [...]
I use phpsysinfo on my server (http://whitefall.arcath.net/phpsysinfo). This allows me to view up to the second information about the server. A rather useful feature of this program is that it works in 2 steps, it generates xml and then parses it. This means that another program can parse the xml aswell.
I have written a wordpress [...]
IRC Bots are something i have been intrested in for a while now, i have personally written 3 bots, each 1 “evolutionary” stage on from the previous one. The first bot i wrote was “Whitefall” and was written in PHP. It was a very simple bot, it could join the channel, tell us the the [...]
Right some updates on my eee. I have everything apart from sound working, although ive been using it everyday for a month now and not noticed till recently so its not a big thing for me.
I have setup Xmonad and Slim on the eee now so i get a nice login screen and a very [...]
I have spent allot of time recently writing a new CMS for arcath.net. And as part of it i decided that it would be nice to have a CAPTCHA image.
At first i searched the internet for a pre written block of code that would let generate one for me. I Found a couple of good [...]
After having a few practice matches on the TF2 server i noticed that although the stats decoder worked, it gave the output in alphabetical order, which isnt what i wanted. So i came up with this:
//Now that we have the array lets order them by rank!
$temp1=$players;
$temp2=array();
for($i=2;$i<=count($temp1)+1;$i++){
$rank=$temp1[$i]['rk'];
[...]
For the Game Server Stats i needed to decode the mani stats file that was generated for CSS and TF2. When i looked at the stats file i noticed that the record for each player varied in length, this is because the mani admin plugin will not store stats for GunA if i have never [...]
I know this may sound ambitions but i was thinking of how to “join” and IRC channel to a Cstrike game. So for example:
IRC:
Arcath: Afternoon
CSS_unrealuniverse: evening
Arcath: how are you?
CSS:
IRC_Arcath: Afternoon
unrealuniverse: evening
IRC_Arcath: how are you?
This would basically work by having the create a connection to both the IRC channel and the CSS Server (As a spectator). [...]
If you have content that you only want to display when the user is accessing your site form a certain IP, like for example if you are the site admin and have a static IP, or if you want to display a link to your company intranet when the user is coming from your companies [...]