I have a server with many gigabytes of static images that are starting to consume all of its available disk space.
This is a configuration I used to create a “Down for Maintenance” page with a 503 HTTP response code in httpd while I redeploy a Tomcat war file.
This reduces the keystrokes needed to introduce a logger variable in your class to simply typing
log and pressing [Tab] in the declaration block of your class.
It took hours to figure out why my python script using peewee yielded
OperationalError(2006, 'MySQL server has gone away'), but I found the problem.
There are a few things I’ve gotten used to in IntelliJ that require some customizations in Eclipse. The following steps will make Eclipse feel more familiar and ease the transition.
This is a list of applications I find useful on a Mac.
This is my Sublime Text custom key configuration on MacOS, which makes it a bit more consistent with other text editors.
A few useful IntelliJ customizations on MacOS.
This post goes through the steps to add the necessary modules in Python that I use.
This article documents an Apache Wicket solution to automatically save drafts of user input in the background using ajax POST requests to the server.
Custom keyboard shortcuts that I find useful.
This is my custom command prompt configuration.
I’ve been wanting to implement a typeahead lookup for universities and thought it would be an interesting weekend project to write an efficient typeahead lookup dictionary structure.
It’s very unlikely that someone will legitimately access your web server by IP address in their web browser, and it’s almost guaranteed to be a bot of some sort. To prevent access to your server by IP address, it’s necessary to examine the
host header in the HTTP request (
HTTP_HOST in Apache) and then deny access if it evaluates to an IP address.
I’ve written a simple script that performs a MySQL database dump and can be defined as a cron job to run at regular intervals.
Live templates in IntelliJ are cool. They reduce the number of keystrokes you need for repetitive code.
HTTP status codes 301 Moved Permanently and 302 Found are used to redirect a user’s web browser to a different location. A user will never notice the difference if your server sends a 301 or 302, but sending a 302 can have negative SEO implications, such as PageRank not transferring correctly to the target page.
I recently had a need to block all IE 6 users from a website. After doing some log analysis, it looked like nearly every IE 6 user agent was some sort of bot or undesirable crawler. The browsing patterns made it very obvious that the requests were not coming from a human, and sometimes the same IP address would send different user agent strings on each successive request.
A common use case during user sign up is to check if the user already exists, either by email address or by user name. Wicket makes this simple.
Google recently introduced a new
I’ve been eyeing a new MacBook Pro for a while and decided to pull the trigger during Apple’s Black Friday promotion. Since I wanted some custom upgrades, I bought it on Apple’s online store instead of at an Apple Store. Apple’s done a great job with their site’s usability, but I found a few things lacking with the experience.
I wrote a few months ago about Yoda conditions and using the final keyword. I recently came across a bug that would never have occurred if a final keyword was used.
Here’s a useful Wicket i18n tip to reduce the amount of code you need to write. Any HTML tag in your HTML template can have a
wicket:message attribute added to it. This is especially useful in
Many people will form an impression of your company based on your website, and if your organization is an online business, this is the only impression you can make. It’s extremely important to create a positive perception by ensuring spelling, grammar, and capitalization are correct.
I’ve been working on a Wicket project that requires JQuery to be present on every single page rendered by Wicket. I do this by including a reference to JQuery from my base page. However, when I add a wiquery component to a subclass of my base page, it automatically inserts a reference to JQuery as well – resulting in markup that instructs the browser to download
jquery.js twice from two different places.
Update March 2019: This article was written in 2011 when this blog was hosted on WordPress and has since been moved to GitHub Pages.
As more people with very little computer experience start shopping online, usability on an online retailer’s checkout page is becoming even more important. One common problem that impacts the user experience is a very rigid credit card input that does not permit users to enter spaces or hyphens.
I came across some code a while back that made me pause for a moment as I figured out its meaning. This code used something known as a Yoda condition, also sometimes referred to as Yoda notation. In a conditional block, the operands on an operator are reversed, so that the constant expression is listed first instead of second.