Do you ever need to kick off a long-running command while SSHed to a server, but be able to disconnect and reconnect at will? You can do this with screen. Before doing anything, start a screen session: screen When you're ready to put your work on hold, detach the screen: screen -d If you have … Continue reading Persistent SSH sessions with screen
How to rename a file in a File upload dialog on Mac
Windows users will scoff at this, but renaming a file in a File Upload dialog box on Mac is a surprisingly obscure action. Renaming is not available in the context menu, nor does the usual shortcut work. To rename a file in a regular Finder window, you can select it and hit the Enter key. … Continue reading How to rename a file in a File upload dialog on Mac
Windows to Mac: Keyboard shortcuts
In December, I got a Macbook Air that I'm now using as a primary development machine. Before that, I was developing on a Windows 7 machine with heavy reliance on Git bash and Cygwin, and using Linux on the server. I've used Linux as a primary desktop at times, but found both dual-boot and VMs … Continue reading Windows to Mac: Keyboard shortcuts
libdb2.so.1: cannot open shared object file: No such file or directory – … ibm_db.so
Got this error while deploying a Rails app on Nginx: libdb2.so.1: cannot open shared object file: No such file or directory - ... ibm_db.so This means that the ibm_db adapter is installed, but it can't find the DB2 libraries. The issue is that IBM_DB_HOME and some other environment variables are not set. The best solution … Continue reading libdb2.so.1: cannot open shared object file: No such file or directory – … ibm_db.so
Linux command of the day: banner
banner can be a useful command for setting login and welcome messages (e.g via /etc/profile). $ banner PRODUCTION ###### ###### ####### ###### # # ##### ####### ### ####### # # # # # # # # # # # # # # # # # # ## # # # # # # # # … Continue reading Linux command of the day: banner
JRuby for the Java .class is .java_class
I've been having a lot of fun working with a Apache jclouds in JRuby. All the examples for the API are in Java and Clojure, while online JRuby docs could be better, so there've been some interesting translation challenges. I just had to re-Google what .class becomes in JRuby, so a quick note for the … Continue reading JRuby for the Java .class is .java_class
Exploring Ruby and Python interactively
Both Ruby and Python offer great interactive shells, also known as REPLs (Read Eval Print Loops). These are handy for verifying snippets of code. You can invoke Python's by simply running python or Ruby's by running irb, jirb (for jRuby), or rails c (for Rails). Sometimes, however, one can be mystified as to what one … Continue reading Exploring Ruby and Python interactively
Circular dependency detected while autoloading constant
I recently ran into this frustrating and intermittent error in Ruby on Rails 4 (JRuby, actually): Circular dependency detected while autoloading constant Googling turned up several articles advising one to abide by the Rails conventions, but that was not the issue. The application I'm writing uses background threads. The problem shows up when trying to … Continue reading Circular dependency detected while autoloading constant
Adobe password breach as the world’s greatest crossword puzzle
Adobe was recently breached and 150,000,000 user accounts were stolen. Adobe was following the one of the worst practices of password storage -- reversible encryption (rather than hashing with a salt using a good, slow algorithm like bcrypt). A very, very old throwaway password of mine was among those leaked. XKCD has referred to this … Continue reading Adobe password breach as the world’s greatest crossword puzzle
The specified bucket is not S3 v2 safe
I ran into this error when running ec2-upload-bundle:The specified bucket is not S3 v2 safe (see S3 documentation for details)This was due to uppercase letters or underscores. Later I also ran into an issue with periods in bucket names which showed up as this error message:ERROR: Error talking to S3: Server.AccessDenied(403): Access DeniedHere is an … Continue reading The specified bucket is not S3 v2 safe