Tips & Tricks
Nice Looking Form Buttons With Only CSS
If there's one thing you find a lot on the Internet (other than lewd images), it's forms. We see them everywhere and use them constantly. There's plenty of really ugly ones out there, but some of them can be pretty nice. One way to help make your forms look nicer is to customize the controls that you use, namely, the buttons. Sure, sometimes you need to create a specific image for a button, but that's not very dynamic or reusable. Luckily there's been a lot of innovations occurring with CSS lately. Unfortunately, there's not a tremendous amount of support for a lot of these new options outside of Mozilla's rendering engine. So keep in mind, if you're browsing this page with IE or some other browser, a lot of these features won't even display for you. So lets start off with a simple button element: Something Something At this point, there's no way of ...
cPanel Brute Force Protection – regaining access
cPanel comes with a great feature called brute force protection. The problem is, if you mis-type your password 5x in a row or if you have multiple people in the office, like we do, that try to get into various services and they combine to have 5 missed passwords in a row (ssh, mail, and whm logins all quality) then you will lock yourself out of your system. Here are some tips & tricks that will help you regain access. Gaining Initial Access The easiest and quite possibly ONLY way to get back into your system is by logging in from a different IP address. Sometimes you can do this by re-initializing your modem/router if you are on a DHCP assigned address from your ISP. This is usually the case for residential service from DSL companies like AT&T (no other ...
Upgrading Redmine From 0.9.6 to 1.0.0
Much of this post is repeated in the Upgrading Redmine from 0.8 to 0.9.3 post we did a few months back. Now with Redmine 1.0 RC out, the upgrade process is once again not as simple as doing a subversion update. If you are downloading tarzips and installing "manually", we recommend saving some time and learning basic subversion commands. Subversion checkout and update is much faster and easier once you have the initial installation in place. These are Cyber Sprocket's notes from our upgrade. For more information you may want to visit the official documentation site. Our Environment The environment we were running before upgrading to Redmine 1.0(RC): Redmine 0.9.6 Apache 2.2.7 MySQL 4.1.22* * Note - we have had discussions with the Redmine development team regarding the MySQL version. We are running MOST features with no problem on MySQL 4.1, ...
Linux mdadm tips & tricks
RAID arrays are an important part of any mission critical enterprise architecture. When we talk RAID here we are talking mirrored RAID, or mirrored and striped RAID, not simply striping which gives you a larger drive from several smaller drives. While that may be great for some home or desktop applications, for a enterprise application that simply doubles your changes of a failed system. We often spec out RAID 1 or higher mirrored systems with RAID 1+0 being the most common (mirrored and striped) so that you increase access performance AND keep the system up if a single drive fails (on a 3 drive RAID 1+0 configuration). Along the way we've learned some tips & tricks that may help you out. To start with we'll post some info on Linux RAID and eventually expand this article to include Windows information. Fake v. Real Raid One thing ...
Ubuntu – No Audio When Playing Videos
I recently tried to play a video on Ubuntu 10.04, but got no audio because of missing a Windows Media Audio codec. My video player tried to automatically find a suitable plugin and failed. So here’s how I fixed it by hand. Step One: Update mplayer The version of mplayer that comes with Ubuntu is behind the times. But that’s easy to fix. $ sudo add-apt-repository ppa:rvm/mplayer $ sudo apt-get update $ sudo apt-get upgrade mplayer Bam. Done. Also why not install smplayer while you’re at it—has a much better interface in my opinion. *Note:* If you prefer to use something else like vlc then upgrading may not be necessary. Check the documentation for your preferred movie player to see about its WMA support. Step Two: Discover the ...
WordPress Image Galleries
One of the nice features of WordPress that we just started using recently is the built-in image galleries. However, as we found out the hard way, it is important to go about creating your image sets for pages and posts carefully. If you attach unwanted images to your page or post it is nearly impossible to remove them from your gallery. Luckily there are some options that can help remedy this situation after-the-fact. Below are some tips & tricks that we hope will help you manage your WordPress images and galleries the easy way! WordPress Image Gallery, The Easy Way The easiest way to ensure your on-page image gallery only contains images you want is to upload any images you DO NOT WANT in the gallery via the admin sidebar "Media / ...
Redmine Wiki Formatting with Textile
We use Redmine rather extensively for managing both our consulting projects and our commercial product releases. While the default commands listed in the Redmine help pages are useful, here are some additional formatting tricks to help you get the most out of your Redmine posts. This also works quite well in forum posts and issue reports. Formatting a Paragraph These simple tricks work quite well for headers as well, simply replace the p with h1, h2, or h3. Remember to put a space after the period that ends the formatting directive. Align the paragraph to the left (default): p<. The paragraph text. Align the paragraph to the right: p>. The paragraph text. Center alignment: p=. The paragraph text. Left side indent by 1em (character): p(. Paragraph text here Left side indent ...
Word 2007 Blank Pages Between Chapters
While working on a documentation project for a client we ran into a unique problem. According to good technical writing practices, you always want chapters to start on an odd page. This puts new chapters on the right-hand page of a bound book. You also want to ensure that any preceding blank page is not 100% blank, most standards dictate at least a footer with a page number and possibly a header with the title of the prior chapter (old school methods were to put a "This page intentionally left blank." message on the preceding blank page, which is one of my favorite all time ironies). After digging around for hours (OK, maybe 10 minutes) I found the solution to this blank page problem. It turns out that when you are forcing pages to start on an odd page # for things ...
WordPress – Sharing A Base Class Amongst Plugins
Introduction The new series of MoneyPress plugins that is coming out in the next month is going to be based on a common foundation. This allows us to maintain consistency, share new features across the product line, and provide an improved quality product that gets out to the consumer. However, during the migration to this new shared platform we uncovered some problem areas deep within the bowels of WordPress. Yes, even with the recently released 3.0 version. However we don't blame this on WordPress. Far from it. WordPress is a well engineered application, it's only fault is being tied into archaic versions of PHP... which means anything prior to PHP 5.3 when namespaces were finally introduced. There is a reason many languages have had namespaces for years, but that is a discussion for another post. One of the more nagging problems was ...
HTTP Errors When Uploading/Connecting in WordPress
Having problems browsing themes, uploading plug-ins, or doing just about anything that "talks" to the outside world via Wordpress? We have had a development server buried deep in our network behind several routers and firewalls that had a similar problem. Whenever we'd log into the dashboard we'd get various timeout error messages on each of the news sections. We'd not get our automatic update messages whenever there was a plugin update or a Wordpress update (3.0 is coming soon!). Well it turns out that we needed to fix 2 things to help speed up the network connection. Fix #1 - DNS Resolution We run this particular development box on Linux. That meant updating our /etc/resolv.conf file to talk directly to the DNS servers. If you use DHCP configuration or go through a router this file is often ...
array_key_exists() versus isset()
Everyone here has the good habit of testing for the existence of keys in a hash before accessing them, since otherwise logs can quickly fill up with notices. There are two ways to make this check: 1. array_key_exists() 2. isset() You should prefer to use isset(), as it is significantly faster. Here is a test and the results I got on my computer: for ($i = 0; $i < 1000000; $i++) { if (array_key_exists('not_here', $foo) && $foo['not_here'] === 'nomnom') { echo "Not here\n"; } } This took 20.5 seconds to run. for ($i = 0; $i < 1000000; $i++) { if (isset($foo['not_here']) && $foo['not_here'] === 'nomnom') { ...
Upgrading Logwatch on CentOS 5
Introduction I finally got tired at looking at the thousand-plus line daily reports coming to my inbox from Logwatch every evening. Don't get me wrong, I love logwatch. It helps me keep an eye on my servers without having to scrutinize every log file. If you aren't using logwatch on your Linux boxes I strongly suggest you look into it and turn on this very valuable service. Most Linux distros come with this pre-installed. The problem is that on CentOS the version of logwatch that comes with the system was last updated in 2006. The logwatch project itself, however, was updated just a few months ago. As of this writing the version running on CentOS 5 is 7.3 (released 03/24/06) and the version on the logwatch SourceForge site is 7.3.6 (updated March 2010). In this latest version there are a log of nice updates to the scripts that ...
Upgrading Redmine From 8.6 to 9.3
After more than a year of using Redmine to help us manage our projects it was time to upgrade. Redmine helps us manage our bug lists, wish lists, and to do lists. It helps us communicate with our clients effectively and efficiently using a web based media in a consistent format that is easy to use for both our developers and our clients. However, during the past year there have been several changes including the significant upgrades that came out in v9.x some months back. Our busy schedule kept us from upgrading as each new release came out, and sadly we had fallen far behind. This past weekend we decided it was time to upgrade. The notes below record some of the problems we ran into and outlines how we resolved them. If ...
Setting Up Stunnel On Linux
Intro This article was written while getting SMTP authentication working with AT&T Business Class DSL services. The SMTP service requires authentication via a secure connection on port 465. Other articles will get into further details, this article's focus is on the stunnel part of the equation, which we use to wrap the standard sendmail/SMTP configuration. In This Article An example stunnel config file for talking to AT&T SMTP servers on port 465 (SMTPS) Testing the connection to AT&T SMTPS is working via telnet Getting stunnel running on system boot. Our Environment CentOS release 5.2 stunnel 4.15-2 We assume you have stunnel and telnet installed. If not, research the yum install commands for CentOS. You will also need superuser access to update the running services on your box. Setting up stunnel Stunnel will allow you to listen for data connections on a local port and redirect that traffic through an SSH wrapper to another system. In our case we are using ...
Finding Which Linux Packages Provide Which Files
There have been multiple situations where I find out that I need a particular file to continue with something I am doing. Most of the time this happens when I am compiling a program. I will be missing a library, or header file, or something. So I end up on search engines looking for whatever package I need to ‘apt-get install’. Well it turns out there is a command line tool that will tell you this information, on systems use Apt, that is. Enter ‘apt-file’. I use Ubuntu, and it doesn’t come with that platform by default. Or at least not on 10.04 then I’m using. But you should know how to get it. A simple ‘apt-get install apt-file’. Once you have it installed, you will have to update the cache it uses for searching. I was prompted to do this automatically, but if you ...

