A Simple Extension to the Python's CSV Object

Posted by Motoma on 22 June 2008 | 0 Comments

Tags: Python, Programming, CSV, Database, Import

One of the side effects of working with database driven software is that you eventually find yourself needing to pull in large amounts of information from old and terrible systems. When talking to your counterparts on the other side of the line (the inter-company line, that is), you will invariably be told that you will only receive your data in one of a few straight forward formats. What follows is a small extension to Python's CSV object which streamlines the process of coding these data transformations.

0 comments | Read the full post

Network RAID Storage: Proof of Concept

Posted by Motoma on 29 December 2007 | 8 Comments

Tags: Linux, connection, hacking, online, networking, RAID, storage

I recently discovered a post on Hack a Day linking to a proof of concept how-to on setting up a software RAID on FTP servers. While the guide is a simple approach to running a network based RAID 5 configuration, a number of tools the original developer used are less than optimal. First, the set up requires both Windows and Linux, meaning you will either need two physical machines, or a virtualized machine in your configuration. The second, and larger problem is that it is restricted to RAID 5 and FTP servers. This article is my attempt to alleviate both of these issues.

8 comments | Read the full post

Security: Perceived Risk versus Potential Damage

Posted by Motoma on 19 October 2007 | 2 Comments

Tags: database, wireless, wifi, hacking, networking, bad software, security, risk, potential, damage

All too often, while running the PHP forum on The Scripts, I see students working who are completely ignorant of the security concerns prevalent with the systems that they build. Worse, when alerted to the potential dangers associated with poor programming practices, these coders let loose a variety of excuses why their application doesn't need to implement a security policy. Ranging from "this is a low traffic/internal site" to "I'm doing this as a project for school, so security really isn't an issue." In my eyes all explanations are equally irrelevant. As leaders of the forums, my colleagues and I daily battle assertions about the validity of these concerns.

2 comments | Read the full post

Daemonizing a Python Script

Posted by Motoma on 10 August 2007 | 0 Comments

Tags: Python, programming, hacking, daemon, daemonize

As my knowledge of Python continues to grow, I find myself using it more in my own systems. This is one of my more useful snippets of code; it allows a Python script to continue running even if you log out or your session gets disconnected. A nice side effect of this is that the process is immediately run in the background, returning the user to a command prompt instantly.

0 comments | Read the full post

Turning on PHP Debugging and Error Messages

Posted by Motoma on 2 August 2007 | 0 Comments

Tags: PHP, function, programming, debugging, error messages, errors, error reporting

Debugging messages are a powerful tool; however, many production systems (and test systems for that matter) have them disabled by default. If your PHP script is crashing horribly and you are not getting any runtime error messages, it is likely that this is the case for you.

0 comments | Read the full post

Gumstix u-boot 1.2

Posted by Motoma on 26 July 2007 | 2 Comments

Tags: Linux, programming, Gumstix, Verdex, USB, kernel, hacking, u-boot, update, Kermit, upgrade, ymodem, serial, HyperTerminal

I took the plunge and, at the risk of bricking my Verdex, updated u-boot. I can only begin to describe the improvements! The process was not nearly as perilous as I anticipated (though I did hold my breath when I rebooted the first time). Noteworthy improvements are the ability to load the kernel directly into the U-Boot environment, and the inclusion of ymodem file transfers over the serial line. The former reduces my boot time to a breathtaking 23 seconds, while the latter reduces rootfs flash time via serial connection by more than half!

2 comments | Read the full post

Verdex && Belkin 802.11

Posted by Motoma on 27 June 2007 | 0 Comments

Tags: programming, Gumstix, Verdex, Console-VX, USB, wireless, wifi, webcam, kernel

With a lot of grunting and groaning, a good amount of grepping through forum posts, and gallons of patience (coffee), I have finally got my verdex board to acknowledge my Belkin F5D7050 and bring the interface up. Due to a small bug in the zd1211rw drivers, the device needs to be brought up before an ESSID can be assigned to it. Without doing so, I would receive a permission denied error for a majority of the iwconfig options:

0 comments | Read the full post

Thinking Outside the Box with Python

Posted by Motoma on 18 May 2007 | 0 Comments

Tags: Python, programming

I recently came across this job posting in the The Scripts Developer Network forums. It has an interesting brain teaser as a requirement for applying. The brain teaser was stated as: "What is the exponent of the largest power of two whose base seven representation doesn't contain three zeros in a row?" The only stipulation was that the applicant use Python to solve the problem.

0 comments | Read the full post

Creating a MySQL Data Abstraction Layer in PHP

Posted by Motoma on 13 April 2007 | 0 Comments

Tags: PHP, MySQL, database, DAL, query, connection, class, function, programming

The goal of this tutorial is to design a Data Abstraction Layer (DAL) in PHP, that will allow us to ignore the intricacies of MySQL and focus our attention on our Application Layer and Business Logic. Hopefully, by the end of this guide, you will have a working DAL and learn a little about PHP, MySQL, and Object-Oriented design in the process.

0 comments | Read the full post

Converting Videos for the iPod Video

Posted by Motoma on 27 December 2006 | 0 Comments

Tags: USB, iPod, MP3 Player, video, conversion

Soon after buying my Video iPod, I wanted to put my massive library of videos onto it, so I could watch them on long trips without carrying along my entire laptop. I wrote a small shell script to perform the mundane task of converting for me, using the free, open-source tool ffmpeg (http://ffmpeg.org).

0 comments | Read the full post

1 2