Archive for the ‘Code’ Category
Monday, October 13th, 2008
I acquired an Alpha LED sign in a '$1 it's broke' Ebay action. Using my undergrad EE skills, I replaced the fuse and had a working sign.
[singlepic=193,700,440,,]
(Also note some of my totally awesome collection of Internet Appliances)
Thing is, I have nothing to use it for. I was going to make ...
Posted in Code, Me, Random | No Comments »
Monday, September 22nd, 2008
Craig Russell updated Dibrova to work with modern compilers, sweet!
Dibrova was built on a RedHat 5 system back in the day, apparently the code wouldn't compile with newer versions of GCC. Craig was good enough to fix that and send me his changes. Viva la open source.
http://thevedic.net/mud/new/
Posted in Code | No Comments »
Tuesday, September 9th, 2008
// type is the dropdown that controls what get displayed.
// folder_drop, radiologist_drop, and resend_box
// get displayed based on the selected value of type.
// This mapping is done in the if/else statements.
// The first time is for when the page loads,
// the second time is when type changes.
//
// The ...
Posted in Code | No Comments »
Friday, September 5th, 2008
function get_color($start, $end, $percent) {
$r1=hexdec(substr($start, 0, 2));
$g1=hexdec(substr($start, 2, 2));
$b1=hexdec(substr($start, 4, 2));
$r2=hexdec(substr($end, 0, 2));
$g2=hexdec(substr($end, 2, 2));
$b2=hexdec(substr($end, 4, 2));
$pc = $percent/100;
$r = floor($r1+($pc*($r2-$r1)) + .5);
$g = floor($g1+($pc*($g2-$g1)) + .5);
$b = floor($b1+($pc*($b2-$b1)) + ...
Posted in Code | No Comments »
Thursday, July 24th, 2008
I'm having trouble explaining this...
This function returns an array of all of the days between two dates. EG: Give it 2008-07-23 and 2008-07-25, and it will return an array containing, 2008-07-23, 2008-07-24, and 2008-07-25.
If you give it an interval, like years, it will give you an array of dates, on ...
Posted in Code | 1 Comment »
Monday, July 21st, 2008
Here is a Perl program that will watch a directory and automatically FTP any files that appear in that directory. It can give each file a unique name, automatically prefix the file with a certain phrase, and keep an archive of files it has sent.
send_ftp Executable
send_ftp Sample Config
send_ftp Source
Posted in Code | Comments Off