Code
For some unknown reason, I'm the type of person who likes to code for the sake of it. The majority of the things I seem to make are of little value, but there is hopefully something useful for people to steal. Pretty much everything here is GPL'd. The only exceptions are one-liners and small files and are all absent of the GPL notice.
PHP
IP address
(V)
(S)
Get and print the IP address of the remote user. Also deals with the situation when the remote user is behind a web proxy.
System Uptime
(V)
(S)
A script to create a graph of the system's uptime. Created because netcraft doesn't work too well ;-)
View-source
(V)
(S)
View-source is a simple wrapper around the PHP highlight_file();
Simply <? include("viewsource.php"); ?> at the top of your file, and passing vs=1 as a parameter (e.g.
viewsource.php?vs=1) shows the source of the file. This directory uses view-source.php to create it's links to the source.
Simple Gallery
(V)
(S)
After hours (well, minutes) wasted searching for a simple non-bloated PHP gallery, I decided to create my own. Copy the index.php file into a directory and populate it with images. The script included automatically creates the thumbnails.
Future versions will hopefully include simpler code and fixed thumbnailing.
PHP-Fortune
(V)
(S)
An (almost) useless fortune script. It, er, prints a fortune from /usr/games/fortune.
JS-VI
(V)
(S)
A rather poor work-in-progress attempt at recreating VI in Javascript. It's more of a project to refresh my JavaScript and W3C DOM knowledge.
AJAX
(V)
(S)
Everyone's using it. It's got a retarded name. It really is just a mix of clever technology and simpler than many people think. This is just a simple script that I made (well, taken from elsewhere and edited) to learn about what AJAX was. Use the following code to add AJAX functionality.
<script type='text/javascript' src='/xhr.js'></script>
<div id='div_name' onclick="loadXMLDoc('div_name', 'fortune.php')">Example ClickMe</div>Click home and then click the fortune in the far right corner to see it in action.
Apache Index Lister
(V)
(S)
Simple php script that lists a remote index page.
Formbuilder class
(V)
(S)
Demonstration of easy form creation, as well as preservation of options between submits.
Linux Scripts
MountUnmount
(S)
This is a useful script to mount and unmount ISO files from Nautilus. Put it in ~/nautilus-scripts and then right-click->Scripts->MountUnmount on an ISO file.
© 2005 Kris Marsh
Uptime: 14:18:16 up 25 days, 10:18, 2 users, load average: 0.52, 0.41, 0.37
Last updated: 2008-24-02 01:05:37am