S3 GUI

Tools

If you are looking for a simple GUI for Amazon’s S3 servcie, there is a pretty good (free) browser plugin product available for Firefox:

S3 Firefox Organizer

Warning: The author of the product states very clearly that he is not responsible for deleted files. He also mentions that he may not continue to maintain the application. Of course, you can still access your files in S3 with another client if he decides to stop working on this free app.

No Comments

BDB JE – Locks, Blocks and Deadlocks

Misc

Below is a handy reference link about BDB JE (Berkeley Database Java Edition) locks, blocks and transactions:

After running some tests, we were amazed by the performance of the concurrent locking mechanism in BDB JE.

No Comments

MySQL Update Table Limit Rows

Examples

Updating a block of rows in MySQL can be accompished by using the “limit” function:

update TABLE_NAME set COLUMN_NAME=VALUE limit MAX;

E.g.

update products set state=false limit 10;
No Comments

Rebuild An InnoDB Table Index

Examples

Rebuilding an InnoDB table index is easy in MySQL 5.0. Simply type:

mysql> ALTER TABLE table_name ENGINE=InnoDB;

Warning: When dealing with large databases, this can place a lot of load on your DB.

No Comments

Subversion – Checkout Older Revision

Examples

The SVN syntax for reverting to a previous version of a file is less than obvious. If you want to pull down a previous version of a file type you must first choose a version:

svn log FILE_NAME

This will list all the changes to the file. Next, you pick the revision you are interested in and then type:

svn up -r REVISION_NUMBER FILE_NAME

This will pull down the older version/revision of the file. Next, we are going to rename the file:

mv FILE_NAME FILE_NAME.good

The next step is to pull down the current version of the file:

svn up FILE_NAME

After that is done we are move the “good” file on top of the latest version:

mv FILE_NAME.good FILE_NAME

Now commit the change:

svn ci FILE_NAME

It seems like there should be an easier way without merging so if anyone knows an easier way, please post it!

No Comments

Linux Process Thread Count

Examples

On Linux, to get a thread count for particular process, issue:

ps UH p PID_OF_PROCESS | wc -l

Removing the pipe to the “| wc -l” yields more information about the running threads.

1 Comment

MySQL Increase Column Size

Examples

An example of modifying a MySQL table to increase a VARCHAR column size:

alter table TABLE_NAME modify COLUMN_NAME VARCHAR(1024) NOT NULL;

This increases COLUMN_NAME to 1024 characters.

No Comments

MySQL Drop Unique Constraint

Examples

In MySQL 5.0 it is possible to drop unqiue constraints but, the syntax is not incredibly intuitive.

alter table TABLE_NAME drop index UNIQUE_CONSTRAINT_NAME;

Code Ghar provides a more thorough description.

1 Comment

SVN Property Edit – Ignore

Config

If you have a list of files in a source repository that you would like SVN to ignore you can specify them by issuing the following command:

svn propedit svn:ignore .

This command pushes you to an editor window where you simply add the files/directories you would like to exclude from the repository.

Once dirctories have been added, you’ll no longer seem them flagged when you type:

svn status

Typically, people tend to add their build directory and similar temporary files/directories.

Don’t forget to commit your changes:

svn commit .
No Comments

Configure Linux Hostname

Config

If you want to change your Linux hostname and you’re running Fedora or Red Hat, the steps are listed below.

Immediate Change

echo 'some.host.com' > /proc/sys/kernel/hostname

Persisted Change

This is for non-DHCP nodes.

Add your name to /etc/sysconfig/network

NETWORKING=yes
HOSTNAME="some.host.com"

If you’re node gets an IP address from a DHCP server then you can set:

DHCP_HOSTNAME="some.host.com"

in the /etc/sysconfig/network-scripts/ifcfg-eth0 file (or whatever your primary device is).

Notes

You can also add your hostname to your /etc/hosts file

10.1.1.10 some.host.com some
No Comments
« Older Posts
Newer Posts »