CartMetrix - Do you know yours?

3/28/2007

Todo.txt - A Command Line Task Tracker

I found Todo.txt by Gina Trapani, randomly last weekend and have been playing with it all week. Todo.txt is a todo list written in shell script. It should run fine under any system that supports a Unix like shell… Linux, OS X, Cygwin etc.

At any given time I have a half dozen post-it pads going with todo lists, usually the things that have to get done TODAY! Todo.txt is so simple to use I’ve misplaced most of my post-it pads (still need paper for the grocery list). :-)

Some examples:

todo.sh add This is my first task
todo.sh add Another task
todo.sh list
02 Another task
01 This is my first task

TODO: 2 tasks in /Users/damonp/etc/todo.txt.

Set task number one to the highest priority, A.

todo.sh pri 1 A
todo.sh list
01 (A) This is my first task
02 Another task

TODO: 2 tasks in /Users/damonp/etc/todo.txt.

I haven’t gotten much further than adding, prioritizing and marking off items, but the builtin help shows options for archiving, reporting, appending, prepending and deleting items.

Popularity: 16%

3/25/2007

Advanced OSX Mail Searches

When you live and breathe email for work and play, it can be quite important to keep messages around for reference. In my business, client and project specific correspondence is supremely important as a record of what has been done, what needs done and project cost quotes among other things. The important information usually gets copied into my bug tracker, project information database and billing applications, but there is just something about the chronological nature of email that helps me follow a project.

What’s the point of keeping email around if you can’t accurately find the messages you are looking for? Apple’s Mail application can be used to do some heavy lifting searches if you can think outside of the box a little. Below are some examples of the general boolean search available directly in Mail.

Heads AND Tails

heads & tails

Heads OR Tails

heads | tails

Heads but NOT Tails

heads ! tails

Heads AND either Tails OR Both

heads & (tails | both)

While researching these search options I found some users that reported that and, or and not worked as well. This is not listed in the Mail documentation and I was not able to confirm their usage. These did not work on my machine. For reference, I am running 10.4.9 and Mail 2.1 (752/752.2).

From the Mail help system:

If you search the From, To, or Subject fields in selected mailboxes, Mail finds messages that contain the entire search phrase, in the order you entered the words. If you search an entire message or search in all mailboxes, Mail finds only messages containing words that have the same prefix (or the same beginning letters) as any of the words you entered in the Search field. The words can be in any order. For example, if you enter “box” in the Search field, the results would include “boxcar” but would not include “mailbox,” because “box” is not part of the prefix in that word.

The help document also mentions that any IMAP accounts need to be configured to “Keep copies of messages for offline viewing”. This setting is configured from the Advanced tab of the Accounts pane in Mail Preferences. The default is to cache “All messages and their attachments.” I use “All messages but omit their attachments.” I would like to use “Only messages I’ve read,” as that would omit all of the uncaught spam and messages that get deleted without being read, but from my tests that option still caches the attachments. I think caching attachments is a waste of bandwidth and local disk space, plus it doesn’t fit in with my normal usage. When I get an important attachment, I download it to a local folder, either a client folder to keep with the rest of the client data or to my general downloads folder where it can be dealt with and deleted when no longer needed.

I have been using a beta version of MailTags for a month now and am finding it more and more invaluable in tracking project and client emails. It adds customizable fields to messages so may easily tag a message with a project name or add notes to a message and adds to the built-in Mail search so you can search by these tags specifically. It also integrates nicely with OSX’s Calendar application, allowing you to create To Do items directly from the MailTags pane in a message.

Another searching option is to create a Smart Mailbox with your search parameters. Smart Mailboxes can be used to mix and match multiple search parameters in the same search. Don’t be shy about creating a Smart Mailbox to do a one-off search. Wouldn’t it be faster to create a Smart Mailbox, use it to find your messages and delete it afterwards than to manually search for a message for twenty minutes? You can also create a Smart Mailbox to pre-select a group of messages, say by including all messages from all of the parties involved in a particular project and then using Mail’s basic search over that Smart Mailbox to find only those messages that contain a particular keyword.

There are some shortcomings I find in Mail’s search and Smart Mailbox implementations. My biggest beef is that Mail won’t let you Cmd-select multiple locations to do a keyword search over. For instance, you cannot search for an email address that appears in the From or To fields. You can do separate searches for both and manually merge them in your head or setup a Smart Mailbox to do the task.

The Smart Mailbox implementation is also crippled in that you can only select messages by all the criterion you supply or by any single criteria not some of these but none of those. This can be overcome by using multiple Smart Mailboxes, one to select all of the messages you want and a second mailbox to deselect the ones you don’t need that happen to fall in to the first mailbox.

Say you would like all messages from a particular domain except the general address info@domain.com. First create the deselect mailbox that finds all messages from info@domain.com, then create a second Smart Mailbox that selects all messages from domain.com and add a second criteria to it that says “Mail is not in mailbox” and choose the deselect Smart Mailbox you created. This is a simplistic example that can be overcome by creating a box that manually selects all messages from user1@domain.com … userN@domain.com, but that would require you to know all of the addresses and key them in.

All in all Mail’s searching implementation is powerful if you know the right tricks. Have some more Mail search tricks? Post via the comments below.

Popularity: 31%

3/20/2007

Selecting Filenames with Non-Standard Characters in the Filename from the Shell

An erroneous cut and paste in an iTerm left me with a group of empty files named after hex color codes.

-rw-r--r-- 1 root root 0 Mar 20 16:54 #ffffb0,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #ffd850,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #ff50a8,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #cceedd,
-rw-r--r-- 1 root root 0 Mar 20 16:54 #c8c8ff,

Trying to delete them provided a little bit of a problem:

[root@atlas bugs]# rm #*
rm: too few arguments
Try `rm --help' for more information.

The problem was the pound (#) character, the initial character in the filenames.

A little trial and error and I remembered a trick from my DOS day and working with long file names:

[root@atlas bugs]# rm "#"*
rm: remove regular empty file '#c8c8ff,'? y
rm: remove regular empty file '#cceedd,'? y
rm: remove regular empty file '#ff50a8,'? y
rm: remove regular empty file '#ffd850,'? y
rm: remove regular empty file '#ffffb0,'? y

Quoting the entire string "#*" won't work because of globbing the quotes make the asterisk part of the string and are never expanded.

Popularity: 21%

Nolisting - Poor Man’s Greylisting

Nolisting - Poor Man’s Greylisting

I thought this was an interesting option to try to weed out some spam on servers inundated by spam. It wouldn’t be a permanent fix as it would only require a trivial workaround. But in my experience, these types are lazy and will go off to easier pickens if they run into too many problems.

Update

I bookmarked this site late last week, but wasn’t able to connect just now. If the site doesn’t come back shortly I’ll post a link or two to other sites discussing. Or if I can find the time, post my own implementation.

Popularity: 13%

3/18/2007

Zencart Inventory Report Update v0.9.2

Feedback from users prompted me to add an extra column to the report display… the master category. The master_category_id is listed in the products table and is generally the category the product was originally created in (unless changed later). The report won’t show every category a product is listed in if the product has been linked to multiple categories.

Download ZenCart Inventory Report

Thanks to Ron for the donation to help out with these feature additions.

Popularity: 25%

3/15/2007

Combating Card Fraud (or at least slow it down)

I have a major client whose Authorize.net gateway account gets hit sometimes hundreds of times a day with charge attempts. Most are posted by an automated script from IPs coming out of Indonesia or Eastern Europe in an attempt to find a valid credit card number and security code. Fortunately, it hasn’t cost the client any money directly yet. Out of the thousands of attempts in the last few months only a couple of charges actually captured funds from the stolen card information. All of these were promptly cancelled after review.

In discussions with this client, we came up with the following options. They are listed in order of ease to implement and least impact on legitimate customers.

  1. Require only a billing address and plainly state all orders are only shipped to billing address
  2. Require card billing address and shipping address to be in same country or deny the order before going to authorize
  3. Require all international orders to be Paypal so they can’t automate the whole process (or maybe allow orders from countries with low fraud percentage to use a credit card directly and all others Paypal)
  4. Automatically log user out after X failed attempts
  5. Automatically block the IP address after X failed attempts for a time period between a few hours to a day or two
  6. Match customer’s IP address to billing / shipping country before going to authorize

My thinking is the better methods would include ways of slowing down the requests so that automated script kiddie tools would constantly fail while legitimate users that are just having problems would not be completely prevented from checking out. I also think a more robust system would utilize several layers of protection (same as a multi-layered approach to server security is better in the long run than putting all of your eggs in the single proverbial basket).

Over the course of the next few weeks I will implement some of these options and dream up more if necessary. Stay tuned for updates.

Should your site be experiencing similar issues, contact me to discuss options.

Note

Maxmind supplies a free IP to country database in CSV format along with their commercial IP database products.

Popularity: 20%

Next Page »


damonparker.org is proudly powered by WordPress
Entries (RSS) and Comments (RSS).

copyright © 2002-2008 damonparker.org. all rights reserved.

Close
E-mail It