This is Stuff: Running JNDI and JPA Without J2EE Container

I often want to have myself a standalone JNDI context.

This was posted 1 month ago. It has 0 notes.

ssh-agent

Run ssh-agent when you login, and kill it when you logout. Put the following into your ~/.bash_profile:

eval `/usr/bin/ssh-agent -s`
trap "kill $SSH_AGENT_PID" 0
This was posted 2 months ago. It has 0 notes.
Security/Server Side TLS - MozillaWiki

via @nzkoz

This was posted 2 months ago. It has 1 note.

PostgreSQL streaming replication status

There is a handy view which shows the state of streaming replication:

pg_stat_replication

You can add an “application_name” parameter in your database connection string to identify your application. This is also the name that PostgreSQL uses for “synchronous_standby_names”.

Note that you can set “synchronous_standby_names” to “*” to let PostgreSQL choose any slave to be the synchronous one.

This was posted 3 months ago. It has 0 notes.

Pretty print JSON from the command-line

This simple Python tool will pretty print the JSON it receives on stdin.

python -mjson.tool
This was posted 3 months ago. It has 0 notes.
AutoRefresher

Uses native OS file change notifications so you don’t need to refresh projects in Eclipse anymore.

This was posted 3 months ago. It has 0 notes.
Linux Commando: Log watching using tail or less

You can start less in tailing mode:

less +F <file>

This was posted 3 months ago. It has 0 notes.
PostgreSQL: Tuning shared_buffers and wal_buffers
This was posted 3 months ago. It has 0 notes.
New kernels for Ubuntu 12.04 LTS

This is quite fun. You aren’t stuck with the kernel that the LTS build came with; these are official new kernels.

This was posted 3 months ago. It has 1 note.

Clone partition map

When setting up new disks for software raid it’s easiest to have an identical partition map. If you have one disk already partitioned, then just duplicate that partition map across to the other:

sfdisk -d /dev/sda | sfdisk /dev/sdb

For goodness sake be careful!

This was posted 4 months ago. It has 0 notes.