stopmotion 0.5.0

April 18th, 2006

I was compiling stopmotion 0.5.0 on my Fedora Core 5 machine and ran into a make problem:

src/technical/util.cpp: In static member function 'static const char* Util::checkCommand(const char*)':
src/technical/util.cpp:32: error: 'assert' was not declared in this scope
make: *** [util.o] Error 1

This problem was easily solved with this patch:

--- src/technical/util.cpp	2006-04-18 14:16:14.000000000 -0400
+++ ../util.cpp	2006-04-18 23:21:26.000000000 -0400
@@ -23,6 +23,7 @@
 #include <istream>
 #include <stdio.h>
 #include <stdlib.h>
+#include <cassert>

 using namespace std;

UltraEdit Wordfiles ~ Qu

April 18th, 2006

This Qu wordfile is only a skeleton for now, but I’ll update it as I learn the language better.

If you find any omissions, please let me know and I’ll try to keep this wordfile maintained.

Downloads (right-click + save as):

ue-qu-20060418.txt

UltraEdit Wordfiles ~ Pike

April 18th, 2006

This Pike wordfile is only a skeleton for now, but I’ll update it as I learn the language better.

If you find any omissions, please let me know and I’ll try to keep this wordfile maintained.

Downloads (right-click + save as):

ue-pike-20060418.txt

pam_mysql 0.7RC1

April 12th, 2006

I needed the latest version of pam_mysql for a project I’m working on, and ended up making a couple of RPMs that don’t appear to exist elsewhere.

Fedora Core 5

The CentOS 4 version has MD5 disabled… there is a problem with cyrus-sasl-devel package which provides the md5 headers.

CentOS 4

Sample configuration:

/etc/pam.d/system-auth

auth        sufficient    pam_mysql.so config_file=/etc/pam_mysql.conf

/etc/pam_mysql.conf

users.host=localhost;
users.database=mydb;
users.db_user=localhost;
users.db_passwd=localhost;
users.table=usertable;
users.user_column=username;
users.password_column=password;
users.password_crypt=plain;
users.disconnect_every_operation=true;
verbose=0;
log.enabled=1;
log.table=logins;
log.message_column=message;
log.pid_column=pid;
log.user_column=username;
log.host_column=machineip;
log.time_column=logintime;

Installing Fedora Core 5

March 25th, 2006

I installed FC5 the other night, on a box that previously ran FC4 just fine…

First attempt

Board: Asus
CPU: Intel P4 2.4Ghz
RAM: 1GB DDR
NIC: onboard SiS900 (known to work in Linux)
Install: CD
Problem: nic driver installed, able to configure card, able to ping card, unable to ping network

Second attempt

Board: Asus
CPU: Intel P4 2.4Ghz
RAM: 1GB DDR
NIC: PCI - 3COM 3c905b (known to work in Linux for sure)
Install: CD
Problem: nic driver installed, able to configure card, able to ping card, unable to ping network

Third attempt

Board: ASRock
CPU: AMD 2400
RAM 1GB DDR
NIC: onboard Via Rhine II (known to work in Linux)
Install: CD
Problem: nic driver installed, able to configure card, able to ping card, unable to ping network

Ok, this is definately a problem with FC5, not my machines…

Fourth attempt

Board: Asus
CPU: Intel P4 2.4Ghz
RAM: 1GB DDR
NIC: onboard SiS900 (known to work in Linux)
Install: FTP

Installing from FTP did the trick… in the end, the network configuration, etc was all the same as CD installations… It’s been running fine for 3 days, and so far, I have yet to figure out what’s different.

aterr 0.9.2

March 16th, 2006

I recently started playing with aterr, which is a really cool, but lightweight, forum system. I found a couple of bugs, but I’m happy to report the developer jumped right on them and released a new version.

Here is the official description of aterr:

aterr is a threaded forum system, allowing registered visitors to express their opinions, discuss topics, and debate with other visitors. A threaded forum system differs from regular, flat forum systems in that once posted, a thread can fork, allowing visitors to reply directly to other posts. aterr also provides a customisable permissions system, the ability to nest forums, and moderation tools.

URL: http://chimaera.starglade.org/aterr/

PHP: Calculating a Real Date using the Day of the Year

March 12th, 2006

Using the day of the year is a great way to denote dates in a database, but it’s hard to convert into a usable date stamp. The following code will return the current day of the year:

$dayofyear = date( 'z' );

This function will take the value of $dayofyear and calculate the proper date stamp and return as specified by the $pFormat parameter:

function dayofyear2date( $pDay, $pFormat = 'Y-m-d' ) {
	$day = intval( $pDay );
	$day = ( $day == 0 ) ? $day : $day - 1;
	$offset = intval( intval( $pDay ) * 86400 );
	$str = date( $pFormat, strtotime( 'Jan 1, ' . date( 'Y' ) ) + $offset );
	return( $str );
}

This is a bit of a hack, so let me explain the function’s logic:

The Day of the Year is an integer, so the first thing the function does is to make sure the passed parameter $pDay is an integer.

The next thing the function does is to subtract 1 from the day, so you can use ‘1′ as the value of $pDay for the first day of the year, instead of ‘0′.

It then multiplies the day of the year ($day) by 86400, which is the number of seconds in a day. This gives us the number of seconds between Jan 1 and the day in question.

By adding the offset to the number of seconds since epoch for Jan 1, we now have the number of seconds since epoch for the current day.

This seconds value is usable by PHP’s date function, so we can now get our properly formatted date stamp.

Konsole / SSH Trick

February 25th, 2006

I have three main servers that I ssh into all the time, and it gets very annoying having to open a Konsole window, then type in ssh server.

Here is an easy way to do it a bit faster:

Make yourself a shortcut (desktop, kicker panel, or kicker menu) using this as the command line: konsole -e ssh user@server and instead of opening up a local konsole, it will open up the ssh console.

You can go one step further and do some key swapping, and you won’t even have to type in your ssh password anymore either.

I got a bit fancier and put some options in my shortcuts: konsole --nomenubar --notoolbar --T "Remote SSH" -e ssh user@server

Fedora Core 4 + Eclipse

January 21st, 2006

In the process of migrating all my development procedures, etc, I’ve run into a few snags. The biggest one so far had the unhealthy result of losing about 9000 lines of code from a project — the entire project!

I installed FC4 with Eclipse from the FC4 CDs. When I loaded up Eclipse, I found that it was a severly hacked version and I couldn’t get several plugins to work properly. I uninstalled Eclipse and install the real 3.1 package from eclipse.org and it seemed to work. However, I created a new file and tried to save it, and got a “Save Failed: org.eclipse.core.internal.utils.UniversalUniqueIdentifier” error. Through the course of trying to work around that, I managed to get my entire project workspace deleted.

The fix was relatively simple once I had some sleep and stopped cursing at Torvalds, McNeely, Gates, and anyone else I could think of.

Step 1: Uninstall FC4’s default JVM (and all related packages). This is interesting since there are a lot of dependancies, but eventually, you’ll clean it all out.

Step 2: Backup your projects (if you have any left) and delete your ~/.eclipse and workspace directories.

Step 3: Uninstall Eclipse - entirely.

Step 4: Install the real JRE from java.com. You may have to put in some symlinks so paths work, etc.

Step 5: Install the Eclipse package from eclipse.org

That will get you going and able to save files. Have fun programming.

UltraEdit Wordfiles ~ PHP

January 10th, 2006

I use UltraEdit for my programming a lot, but I’ve noticed that the wordfiles IDM provides are far from complete. Here is a wordfile for PHP that is compiled straight from the PHP function manual - current as of January 10, 2006.

If you find any omissions, please let me know and I’ll try to keep this wordfile maintained.

Downloads (right-click + save as):

« Previous Entries   Next Entries »