s3cmd ‘ERROR: Test failed: 403 (AccessDenied): Access Denied’ and ‘ERROR: Config: verbosity level ’20’ is not valid’ [SOLVED]

I’m working on a project that includes sending data via Amazon Simple Storage Service (S3) and was having some problems configuring and using the s3cmd client.

The first thing I discovered about s3cmd is not to trust what it tells you when invoking s3cmd –configure to get things set up to use the bucket.

$ s3cmd -v –configure s3://some-bucket/some-prefix/

Enter new values or accept defaults in brackets with Enter.
Refer to user manual for detailed description of all options.

Access → Continue reading “s3cmd ‘ERROR: Test failed: 403 (AccessDenied): Access Denied’ and ‘ERROR: Config: verbosity level ’20’ is not valid’ [SOLVED]”

Clone and Backup a Bootable USB Drive

We recently got a new ASUS laptop for the boys to use (I’ll use it too, it’s pretty sweet) which came with Windows 8.

It did not come with the install CD or license key, but included a recovery partition and the key in the BIOS.  Now that we’ve had it for a few weeks and verified that all of the hardware works, we are going to put Ubuntu on it, but I wanted to make sure that I would → Continue reading “Clone and Backup a Bootable USB Drive”

Creating a Beep from a Command Line or Shell Script

If you have a long-running command on shell-script that you want to generate a beep upon completion on your PC running Linux do the following:

. Make sure that the pcspkr module is loaded:

# modprobe pcspkr

. Then create a wrapper shell script that looks something like this:

#!/bin/bash

# Some long running command here . . .

echo -e ‘\a’ > /dev/console

Continue reading “Creating a Beep from a Command Line or Shell Script”

Eclipse Crashing with SIGSEGV, Problematic Frame libgdk and/or libsoup Problem Solved

I’m setting up a new workstation under Fedora Core 20 and getting my dev environment set up.

I had copied over my /opt dir from my old machine which included an older version of Eclipse (3.8.2) that I had been using.  That version wasn’t behaving very well and I decided to go with the latest and greatest stable version (Kepler, 4.3.1).

Unfortunately, Kepler was dumping core with the following error:

 A fatal error has been detected by the Java Runtime Continue reading “Eclipse Crashing with SIGSEGV, Problematic Frame libgdk and/or libsoup Problem Solved”

Excellent Example and Explanation on How to Inject Properties from an External Properties File from Outside of a WAR in a Spring Application

I am doing some refactoring on a Spring MVC application, pulling out configuration data and login crentials from the spring.xml file.

What I want to do is to consolodate sensitive data into external .properties files that can be read, at runtime by the app and not require recompiling the war to make changes.

Thanks to Ben Northrop and Summa Technologies for such a clear, concise and well written article.

The long and the short of it (copied from the → Continue reading “Excellent Example and Explanation on How to Inject Properties from an External Properties File from Outside of a WAR in a Spring Application”

Disabling Window Snapping for Fedora Core 20 Under Xfce

For me, window snapping is incredibly annoying.

For FC 20 with the Xfce spin, there a couple of knobs to turn before it can be turned off completely:

Applications Menu/Settings/Window Manager:

Go to the Advanced tab and uncheck ‘Snap windows to screen border’ and ‘Snap windows to other windows’

Applications Menu/Settings/Window Manager Tweaks:

Go to Accessibility tabUncheck the ‘Use edge resistance instead of window snapping’→ Continue reading “Disabling Window Snapping for Fedora Core 20 Under Xfce”

Executing Dynamically Generated SQL Queries in a Shell Script and Saving the Output to a Variable

If you would like to, in a shell script, dynamically generate SQL queries for MySQL and save the output of those queries to a variable that you can then use in the script, here is an example:

#!/bin/bash

for i in `cat tables_list.txt`
do

   # Build the query
   QUERY=”SELECT count(*) FROM ${i}”

   # Run the query from the command-line and save the
   # output into the $ROW_COUNT variable
   ROW_COUNT=$(echo $QUERY | mysql -u${USER_NAME} -p${PASSWORD} -h ${HOST} -P ${PORT} –skip-column-names ${DBASE})→ Continue reading “Executing Dynamically Generated SQL Queries in a Shell Script and Saving the Output to a Variable”

Figuring out MySQL ERROR 1005 (HY000) Can’t create table (errno: 150)

So I’m dumping a database on a remote server to pull down to my local box to do some development.  When loading the mysqldump file I encountered the error:

ERROR 1005 (HY000) at line 8680: Can’t create table ‘database.table’ (errno: 150)

After doing some searching online it seems that is one of the notoriously cryptic MySQL error messages that is woefully overloaded.

I did manage to fix the error (which ended up being a foreign key reference from another table → Continue reading “Figuring out MySQL ERROR 1005 (HY000) Can’t create table (errno: 150)”

Install Android Application Directly Without it Being in the Market

When developing apps you will not only want to test them against the Eclipse AVDs but also install them on an actual device.

To do so, set up an HTTP server (here is a link to another article on how to set up a quick and dirty HTTP server) and put you .apk file somewhere where you can get to it from your local network.

Make sure that you check the ‘Unknown sources’ setting that will enable you to → Continue reading “Install Android Application Directly Without it Being in the Market”