tmux and SecureCRT settings
Richard gave me a call today to show the wonders of tmux. I am using Windows, and unfortunately, right off the bat I couldn’t see color and there were a bunch of accented a
s dividing the panes.
After some trial and error and finding this post on the subject we got it working. The key is to configure SecureCRT to use xterm + ANSI colors and set the character set to UTF-8 and “Use Unicode line drawing code points”.
Hooray! I’ll be trying out tmux in day-to-day use to see if it will replace or augment screen for me.
terminal
Update Your GNU Screen Config on the Fly
An Indispensable Tool
I use Screen constantly in my work at End Point. It is an indispensable tool that I would not want to operate without. It’s so handy to resume where I left off after I’ve detached or when my connection drops unexpectedly. This is likely preaching to the choir but if you are not already using Screen and/or tmux, start now.
The Scenario
I often find myself in the following situation:
- SSH into a server
- Fire up a new Screen session
- Create several windows for editing files, tailing logs, etc.
- Realize the default Screen configuration is inadequate or does not exist.
- Facepalm \O/
While my needs are fairly minimal, I do like to bump up the scrollback buffer and display the list of windows in the status line.

There are a couple of options at this point. I could put up with the default / non-existent configuration or create a config file and manually re-create the session and all of the windows to pick up the configuration changes. Neither of these options was desirable.
I wanted to be able to update the configuration and have all of the existing windows pick up the changes. After asking around a little I ended up taking a look at the manual and discovered the …
terminal tips
Is AVS for International Customers Useless?
Any ecommerce site that sells “soft goods”, some digitally delivered product, has to deal with a high risk of credit card fraud, since their product is usually received instantly and relatively easily resold. Most payment processors can make use of AVS (Address Verification System). It usually works well for cards issued by United States banks with customers having a U.S. billing address, but its track record with international customers and banks has been less than stellar.
AVS compares a buyer’s address information with what the bank has on file for the card’s billing address. To reduce false negatives, that comparison is limited to the postal code and the numeric part of the street address. The lack of consistent AVS implementation by non-U.S. banks, and the variety of postal codes seen outside the U.S., Canada, and the U.K., mean problems creep in for most international orders.
Any time you reject an order, whether it’s for a legitimately incorrect billing address, a bank/AVS problem, or any other reason, you’re increasing the likelihood of losing the customer’s business, having them retry and cost you more in payment processing fees, …
ecommerce payments
Piggybak Extensions: A Basic How-To Guide
This article outlines the steps to build an extension for Piggybak. Piggybak is an open-source Ruby on Rails ecommerce platform created and maintained by End Point. It is developed as a Rails Engine and is intended to be mounted on an existing Rails application. If you are interested in developing an extension for Piggybak, this article will help you identify the steps you need to take to have your extension leveraging the Piggybak gem, and integrating smoothly into your app.
Introduction
The Piggybak platform is lightweight and relies on Rails meta-programming practices to integrate new extensions. The best references to use alongside your development should be the previously developed extensions found here:
It is likely that your extension will tie into the admin interface. Piggybak utilizes the RailsAdmin gem for its admin interface.
Setting up the Development Environment
A convenient way to start building out your extension is to develop against the demo app found here. The demo app utilizes the Piggybak gem and comes with sample data to populate the e-commerce store.
The Piggybak demo app sample data is exported …
piggybak rails
Custom validation with authlogic: Password can't be repeated.
I recently worked on a small security system enhancement for one of my projects: the user must not be able to repeat his or her password for at least ten cycles of change. Here is a little recipe for all the authlogic users out there.
We will store ten latest passwords in the users table.
def self.up
change_table :users do |t|
t.text :old_passwords
end
end
The database value will be serialized and deserialized into Ruby array.
class User
serialize :old_passwords, Array
end
If the crypted password field has changed, the current crypted password and its salt are added to the head of the array. The array is then sliced to hold only ten passwords.
def update_old_passwords
if self.errors.empty? and send("#{crypted_password_field}_changed?")
self.old_passwords ||= []
self.old_passwords.unshift({:password => send("#{crypted_password_field}"), :salt => send("#{password_salt_field}") })
self.old_passwords = self.old_passwords[0, 10]
end
end
The method will be triggered after validation before save.
class User
after_validation :update_old_passwords
end
Next, we need to determine if the password has changed, excluding …
rails
Interactive Piggybak Demo Tour
A new interactive tour of Piggybak and the Piggybak demo has been released at piggybak.org. Piggybak is an open source Ruby on Rails ecommerce framework built as a Rails 3 engine and intended to be mounted on existing Rails applications.
The tour leverages jTour (a jQuery plugin) and guides you through the homepage, navigation page, product page, cart and checkout pages, gift certificate page, advanced product option page, and WYSIWYG driven page. The tour also highlights several of the Piggybak plugins available and installed into the demo such as plugins that introduce advanced product navigation, advanced product optioning, and gift certificate functionality. Below are a few screenshots from the demo.
An interesting side note of developing this tour is that while I found many nice jQuery-driven tour plugins available for free or at a small cost, this jQuery plugin was the only plugin offering decent multi-page tour functionality.
javascript jquery piggybak rails
Mobixa: A Client Case Study
A few weeks ago we saw the official (and successful!) website launch for one of our clients, Mobixa. Mobixa will buy back your used iPhones and/or provide you with information about when you should upgrade your existing phone and sell it back. Right now, Mobixa is currently buying back iPhones and advising on iPhones and Androids. End Point has been working with Mobixa for several months now. This article outlines some of the interesting project notes and summarizes End Point’s diverse skillset used for this particular website.
Initial Framework
Mobixa initially wanted a an initial proof of concept website without significant investment in development architecture because the long-term plan and success was somewhat unknown at the project unset. The initial framework comprised of basic HTML combined with a bit of logic driven by PHP. After a user submitted their phone information, data was sent to Wufoo via a Wufoo provided PHP-based API, and data was further handled from Wufoo. Wufoo is an online form builder that has nice export capabilities, and painlessly integrates with MailChimp.
This initial architecture was suitable for collecting user information, having minimal local …
clients php rails case-study
Slash URL
There’s always more to learn in this job. Today I learned that Apache web server is smarter than me.
A typical SEO-friendly solution to Interchange pre-defined searches (item categories, manufacturer lists, etc.) is to put together a URL that includes the search parameter, but looks like a hierarchical URL:
/accessories/Mens-Briefs.html
/manufacturer/Hanes.html
Through the magic of actionmaps, we can serve up a search results page that looks for products which match on the “accessories” or “manufacturer” field. The problem comes when a less-savvy person adds a field value that includes a slash:
accessories: “Socks/Hosiery”
or
manufacturer: “Disney/Pixar”
Within my actionmap Perl code, I wanted to redirect some URLs to the canonical actionmap page (because we were trying to short-circuit a crazy Web spider, but that’s beside the point). So I ended up (after several wild goose chases) with:
my $new_path = '/accessories/' .
Vend::Tags->filter({body => (join '%2f' => (grep { /\D/ } @path)),
op => 'urlencode', }) .
'.html';
By this I mean: I put together my path out of …
apache interchange perl seo