giovedì 23 dicembre 2010

Problem connecting to a MySql server

While trying to connect MS-Access via ODBC to a mysql server, I kept getting this error:

connection failed mysql 10060

The page that explained the problem is:

http://forge.mysql.com/wiki/Error2003-CantConnectToMySQLServer

The default /etc/mysql/my.cnf has

[mysqld]
...
bind_address=127.0.0.1
...


which must be commented out for a remote client to gain access to the server

mercoledì 22 dicembre 2010

HTML cleanup with regexp and TextMate

to remove all spans: cmd-F, activate regexp, then:

Find: <span.*?>(.+?)<\/span>
Replace: $1


the question marks prevent greedy matching

lunedì 20 dicembre 2010

Autotest config

What seems to be working for me is the following:

group :development, :test do
gem 'rspec-rails'
gem 'webrat'
gem 'autotest'
gem 'autotest-growl'
gem 'autotest-rails'
gem 'cucumber-rails'
gem 'factory_girl_rails'
gem 'mocha'
gem 'launchy'
end

And in ~/:autotest
require 'autotest/growl'
Autotest::Growl::clear_terminal = false
Autotest.add_hook :initialize do |at|
at.find_directories = ['./features', './spec', './app', './lib']
end

The hook selects directories to watch. The default setup caused autotest to run features continuously

venerdì 17 dicembre 2010

Setting up SSHFS connections

First, make sure you can ssh to the server

On the local machine (universe must be enabled):
$ sudo aptitude install sshfs
$ sudo chmod +x /bin/fusermount
$ mkdir /home/giuseppe/remote
$ sudo modprobe fuse
the last command loads fuse. In order for this to happen automatically at startup:
$ sudo cp /etc/modules /etc/modules_bak
$ sudo sh -c "echo 'fuse' >> /etc/modules"
Now the actual mounting:
$ sshfs the.remote.machine:/shared/path /home/giuseppe/remote