samuel joseph levy

coder, gamer, political miscreant

SamTodo 2.0 announced

The latest on SamTodo

  • SamTodo is being completely rebuilt!
  • There will be no 1.2 release, the next version will be 2.0
  • 2.0 will include exciting new features, improving flexibility
  • Instead of the Fusebox framework, SamTodo will be created using object-oriented PHP
  • A new member has joined the team, developer Wade Lasson
  • For those using 1.1, the new version will include a script to update your existing database so that it functions with 2.0

SamTodo 1.2 making headway

1.2 is not dead! Last night I made some good progress.

Some of the features you will see in 1.2:

  • Multiple-user system
  • Cookie-remembered logins
  • Installation script
  • Language pack support, initially with French, German, Portuguese, and Spanish
  • An in-application configuration page
  • Tasks now have date selection with pop-up calendar

Development screenshots:

Continue Reading →

how to quickly add another user to samtodo 1.1

I realize I have been taking my sweet ass time with SamTodo 1.2, so here is a little something you can do until multi-user support becomes native.
Note: Please backup everything (including your database) before doing this!

STEP 1
EDIT _model\global\act_config.php

Add an $account_name2, and $account_password2 underneath the originals so it looks something like this:

// SamTodo login information
$account_name = "sam";
$account_password = "password";

$account_name2 = "sam2";
$account_password2 = "password2";

STEP 2
EDIT _model\account\act_login.php

Change line 13 to 25 from:

if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {

// establish their ID and name as session variables for use elsewhere
$_SESSION["accountID"] 	 = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
$_SESSION["accountName"] = $account_name;

// redirect to main
header( "Location: " . $root_path . "main.default" );
}
else
{
$error = 1;
}

To:

        if(($_REQUEST["accountName"] == $account_name) && ($_REQUEST["accountPassword"] == $account_password)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000000"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name;

            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        elseif (($_REQUEST["accountName"] == $account_name2) && ($_REQUEST["accountPassword"] == $account_password2)) {
            // establish their ID and name as session variables for use elsewhere
            $_SESSION["accountID"]      = "00000000-0000-0000-0000-000000000001"; // account ID's will be used in a later release
            $_SESSION["accountName"] = $account_name2;

            // redirect to main
            header( "Location: " . $root_path . "main.default" );
        }
        else
        {
            $error = 1;
        }

Continue Reading →

cfsearch with a category restriction

ColdFusion’s Verity is difficult to figure out. There’s hardly any documentation for it online and there are a number of quirky little issues that cause a lot of frustration. Today I was trying to do what seemed to be rather simple, at least according to the Adobe docs: searching a collection that contains categories.

I have a table of articles, a table of categories, and a relational table joining the two. It’s a many-many relationship (an article may have multiple categories and a category may have multiple articles). I also have a collection created in CF Administrator named articles_index with the categories option enabled.

With the following code I queried and indexed the data from my articles table, and included a comma-list (generated by a MS SQL UDF) of custom categories in the cfindex’s category param, see below:

<cfquery name="IndexArticles" datasource="webdsn">
     SELECT *,
     dbo.CategoryIDList(articleID) CatIDList
     FROM dbo.Articles
</cfquery>

<cfindex
query="IndexArticles"
collection="articles_index"
action="refresh"
type="Custom"
key="articleID"
title="articleID"
body="articleName,articleAuthor,articlePubDate,articleDescription,articleKeywords"
category="CatIDList">

<h3>indexing complete</h3>

And if you’re curious, this is how my UDF looks in MS SQL that created the CatIDList (called in the IndexArticles SELECT statement above):

CREATE FUNCTION dbo.CategoryIDList(@articleID char(35))
RETURNS VARCHAR(1000) AS

BEGIN
DECLARE @CatIDList varchar(1000)

SELECT @CatIDList = COALESCE(@CatIDList + ',', '') + RTRIM(articleID)

FROM
dbo.Category

INNER JOIN dbo.Document ON clocatID = clocatdocCategory
INNER JOIN dbo.articleument ON clocatdocDocument = articleID

WHERE articleID = @articleID

RETURN @CatIDList
END

Continue Reading →

osmoothie has a new home

osmoothie has been migrated over to a new hosting company, Media Temple.

traffic spike

SiteGround — my previous host, which I normally had had no trouble with, placed me on notice for suspension because of a spike in traffic on May 6 (due to the post: “Governor Brian Schweitzer signs revolutionary new gun law in Montana“). osmoothie is PHP heavy and consumes a lot of processing power (even though it uses WP Super Cache). Under SiteGround’s ToS, a certain number of CPU cycles cannot be consumed within an hour — else other clients on the same shared hosting plan could suffer. My site exceeded these limits and, as it has grown, will exceed them again in the future. This was my reasoning behind moving to a Grid Server solution at Media Temple.

So far I am very pleased with their Control Panel and Customer Service. All of the little issues that come with hosting migration have been resolved with their Tech Support in a timely manner. They even have 24/7 phone support with 2 minute waiting or less. Their hosting plans offer great solutions for larger websites at affordable rates. Check them out if you’ve been looking for a more robust solution.

Before the DNS servers propagated, you may have noticed the site down, or unresponsive. The process is now complete and there should not be any more difficulties accessing the site. Sorry for the inconvenience.

Galco’s F.E.D. Paddle Lined Holster

When looking for a casual open-carry holster for a Glock 26, I checked out several different brands including Blackhawk (the SERPA release holsters), Fobus, Bianchi, and Galco. Most of the holsters offered by these companies are on back order and have limited supplies for south-pawed shooters like myself. I passed over the cheaper polymer form-fitted holsters (which I have heard work fine) for a higher quality and more expensive leather.

Galco’s F.E.D. Paddle Lined Holster looked great, it had a left-handed model in stock and was made of quality leather. The paddle also clips on to your waistband and hooks underneath your belt, allowing for on/off usage of the holster without having to remove your belt. The paddle is not only comfortable but secure. So secure in fact that it can be a challenge to remove from your waist. As expected the leather is a little stiff and holstering the firearm is not as smooth as it will be after breaking in. I look forward to field-testing this holster, and am so far impressed with Galco’s speed of delivery and craftsmanship. If you are looking for an open-carry holster, take a look at the F.E.D., it is available for a number of different handguns.

Galco's F.E.D. Paddle-Lined Holster

Replaced the Apple Wired Keyboard, no defects found

In response to “Defect with the Right Arrow key on some Apple Wired Keyboards,” I have replaced my Apple Wired Keyboard with a new one, directly from Apple’s online store. After several hours of use, the new keyboard shows no sign of defective or insensitive keys. Hopefully it’ll stay that way!

Defect with the Right Arrow key on some Apple Wired Keyboards

Apple Wired Keyboard

I recently purchased an Apple Wired Keyboard from NewEgg to use with my Vista computer (see this article on how to effectively remap keys with Vista using SharpKeys — it’s helpful for Bootcamp users too).  I was attracted to this device because of its sleek appearance, low profile, and gentle typing experience.

To my dismay, though, after using the product for a couple of hours I noticed that the right arrow key required a slightly longer or harder keypress, and that the finger had to be exactly center on the key to register a first response. Holding the key down or pressing rapidly after the first failed response would illicit normal behavior (so long as you were applying continual pressure or taps).  As soon as you let off of the key for awhile and came back to it, the first response once again would fail — but subsequent taps or pressure would be successful.

For someone who edits large volumes of text the shift + arrow key combination is crucial to quickly selecting words and phrases for cutting and overwriting.  This little problem proves quite frustrating and I am fighting with it even as I write this article.

I did a quick Google search and found one result (on the Apple Support forums) concerning the issue.  The only real solution described: return the keyboard for a new one.  Unfortunately some users reported that it took several returns (one up to three keyboards) before finding a board without this problem.

NewEgg does not allow for replacements of this item and when I went to find it on their site again I discovered that they have “Deactivated” the product (it does not specify if it is Out of Stock or Discontinued). I will have to deal with Apple directly (NewEgg claims that they provide a 1 year warranty). Some users on the discussion forum have had success getting a replacement at an Apple Store (sometimes only after a demonstration of the problem to one of the Geniuses).

I will post another article when and if I decide to try for a replacement, but otherwise my general typing experience with this board has been pleasurable.

SamTodo finally has a logo!

I want to thank Brent Lagerman from mimoYmima.com for designing the new logo for SamTodo!
A variation of this logo will be included in the next release.
samtodo

SamTodo 1.2 will use FBX 5.0.1

Version 1.2 will be using the latest stable release of Fusebox for PHP (version 5.0.1 as cited by Mike from Team Fusebox).  The fusebox5 directory on SVN has been updated.

Copyright © 2010 — samuel joseph levy | Powered by Wordpress and Crispp