WordPress 3.5 Initial Impressions

This blog has been updated to WordPress 3.5. Initial impressions:

  • everything is less rounded now
  • Twenty Twelve (the new theme) sucks for following reasons:
    • uses custom font: causes this blog unreadable until fonts are loaded (at least in chrome)
    • image header: positioned below navigation menu (and the header text is above the menu)
    • no more search bar in navigation menu
  • the new media uploader looks useful

Overall there isn’t much change (what should I expect here) but the new theme sucks. At least to be used on this blog.

PostgreSQL authentication quick start

Connecting to PostgreSQL from command line can be a bit confusing.

For starter, just like MySQL, psql command defaults to connecting to socket instead of tcp. To make matter confusing, most PostgreSQL installation defaults to ident (also called peer)authentication for socket connection: it basically matches current user’s username (ssh login, etc) with PostgreSQL equivalent.

So, instead of using this to login from root to PostgreSQL superuser (usually named postgres or pgsql):

# psql -U postgres

you do this (assuming sudo installed):

# sudo -u postgres psql

The configuration for this is located in pg_hba.conf of PostgreSQL data (or config in Debian) directory (/etc/postgresql/$version/main in Debian, /usr/local/pgsql/data in FreeBSD, /opt/PostgreSQL/$version/data in EnterpriseDB PostgreSQL).

To switch to password based authentication for all methods just replace ident (or peer) with md5 in respective lines and reload/restart the service. Don’t forget to set password for postgres user first before changing this otherwise you won’t be able to connect. You can then connect using psql to any user using password.

Building Latest Transmission in CentOS 6

By default, CentOS 6 (and other RHEL clones) only provides transmission 2.13. There’s alternative repository from transmission official site but it isn’t really all that “latest” either (and I don’t fancy adding random repositories).

First, compile libevent2:

  • install gcc and make
  • download and extract the source
  • ./configure --prefix=/opt/libevent2 && make && make install

And then compile transmission (hopefully you don’t need the gtk interface):

  • install gcc-c++
  • configure with PKG_CONFIG_PATH=/opt/libevent2/lib/pkgconfig ./configure --prefix=/opt/transmission --disable-nls --enable-daemon
  • finally, make && make install
  • if there’re missing dependencies, just install them (they’re all in repository apart of libevent2)

Don’t forget to add path to transmission in bash default profile (inĀ /etc/profile.d/custom.sh):

PATH="/opt/transmission/bin:${PATH}"

And done! Enjoy the latest transmission.