Restoring readline capabilities of Ubuntu’s 9.10 (Karmic Koala) MySQL client

December 24th, 2009 pablo 3 comments

I recently updated to the newest version, 9.10 AKA Karmic Koala and I love it. It’s fast and everything works perfectly. Or nearly everything…

Read more…

Configuring a shared repository in Bazaar for users with no shell access

November 5th, 2009 pablo No comments

One of the things that stumbled me the most about bazaar is that it does not have a own authentication method. Users can access repositories through ssh, sftp, etc. While this is very usefull if everyone working on the repo has shell access to the server, it does not allow “virtual users” the way svn does. Well, not out of the box anyway… There’s always a workaround. This post tries to explain how to configure Bazaar in the centralized model and set user level permissions to the working directory.

Read more…

Categories: bzr Tags: , , , , ,

Restore / uncompress a plesk backup file using terminal

November 2nd, 2009 pablo No comments

Today I was had to move a few web sites from one server to another. As I did not have ssh or ftp access to it, the only way to do it was through Plesk. As I don’t have experience using Plesk, I did not know that Plesk’s built in File Explorer can only be used to manage your web site’s files within the server, but it does not let you download those files. So, looking around Plesk’s admin interface I found the backup feature. That looked promissing, so I clicked on it and it brought me to another page called “Backup Manager”. This page allows you to set up periodic or one time backups. Backups can be saved in Plesk’s local repository or in an external FTP server. So I set up all the FTP details and start the backup. Once the backup finished I tried to open it on a linux box and file-roller gave an error when it tried to extract it. A `file` showed that the file was indeed in gzip format.

Read more…

Categories: Plesk Tags: , , , , , ,

Bash Script to create a new symfony project and install optional plugins

October 29th, 2009 pablo 3 comments

As we already mentioned in my last post, I have been playing a lot with Symfony these last few months. While I really enjoy working with symfony, it is always a pain to remember how to start a new project, install all the plugins and read the plugin’s documentation. After googling around I found that Gordon Franke published this post. It had a basic script to install symfony and have it working out of the box with very little effort. Me, being a huge fan of little effort, decided to change this script so that it’s even more useful and more powerful, so I don’t loose time installing all those boring and needed plugins I like. The result can be found on GitHub. The script works pretty well, but it does have bugs, so don’t be shy and report them, or fix them when you find one!

Categories: bash, symfony Tags: ,

Ignored files in Bazaar in a Symfony project

October 23rd, 2009 pablo 5 comments

Recently, I’ve been doing a few projects using Symfony PHP framework and Bazaar for version control. One of the great features of Symfony is that it generates base classes automatically to interact with the database from a pre-defined schema file. While this is a great feature, every time the schema gets changed, Symfony regenerates all the files thus flagging them as modified in Bazaar. To avoid committing those files all the time, I created a .bzrignore file to ignore them and leave my repository nice and clean.

Read more…

Categories: bzr, php, symfony Tags: , , , , , ,

PureFTP + MySQL with pure-uploadscript functionallity

June 25th, 2009 pablo 1 comment

First lets install pureftpd using apt-get:

Install pureftpd with the MySQL backend:

apt-get install pure-ftpd-mysql

Read more…

Wolfram|Alpha Plugin

May 21st, 2009 pablo 2 comments

Here’s a little wordpress widget I’ve written. For those not familiar with it, wolframalpha|Alpha is a computational knowledge engine. Basically, it claims to answer every question you might or might not have including the final answer to life, the universe and everything. It’s very interesting in my opinion and it’s worth a try. Therefore I’ve written a little wordpress plugin so you can easily add it to your wordpress blog if you want.

Read more…

Using apache’s RedirectMatch instead of ServerAlias to avoid content duplication

May 18th, 2009 pablo 3 comments

Most web sites I do have many domains but want all those domains to point to the “main domain” www.domain.com. My first solution was to put Apaches’s directive ServerAlias in the site’s virtual host configuration. This lead to content duplication since domain.com and domain.net and www.domain.com are two different web sites for the rest of the world. To avoid this problem the only solution I’ve found was to create two different virtual hosts and set Apache’s Redirect directive. The first VirtualHost will hold all the domains aliases and redirect permanently (301) to the “main domain”

Read more…

Categories: apache Tags: ,

Get unix timestamp in bash

May 9th, 2009 pablo No comments

I’m posting this since I always forget it…

date +%s

More info: http://www.cyberciti.biz/faq/linux-unix-formatting-dates-for-display/

Categories: date/time Tags: , ,

Keeping directories in sync with unison

May 9th, 2009 pablo 3 comments

As opposed to rsync, unison is a two way file synchronizer. Similar to MySQL’s master to master replication. To set it up in Ubuntu (Intrepid) keep on reading…

Read more…

Categories: Uncategorized, mysql, php, server, sync Tags: , , ,