If you cannot get TextMate to use the correct bundles for Ruby on Rails and RSpec code, then you may have manually modified the bindings in a way that confuses TM.
These instructions will fix the problem.
martedì 17 maggio 2011
lunedì 9 maggio 2011
Ubuntu server: mounting a USB drive
Follow these directions!
In a nutshell, for an NTFS drive:
In a nutshell, for an NTFS drive:
$ sudo fdisk -l
$ sudo mkdir /media/myusb
$ sudo mount -t ntfs-3g /dev/sdb1 /media/myusb
$ sudo umount /media/myusb
mercoledì 27 aprile 2011
dot-underscore files when macos copies to other file systems
In certain situations, copying files from the Mac file system to a different fs (e.g. to NTFS via NTFS-3g) results in the creation of extra 4KB-long files with names that begin with ._
Not sure how to prevent this. Look at the comments in this post.
To erase all those files from a directory tree:
$ rm */._* -R -v
(careful...)
Also see this for a terminal command that merges ._s with the original file
Not sure how to prevent this. Look at the comments in this post.
To erase all those files from a directory tree:
$ rm */._* -R -v
(careful...)
Also see this for a terminal command that merges ._s with the original file
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
which must be commented out for a remote client to gain access to the server
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:
the question marks prevent greedy matching
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:
And in ~/:autotest
The hook selects directories to watch. The default setup caused autotest to run features continuously
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):
On the local machine (universe must be enabled):
$ sudo aptitude install sshfsthe last command loads fuse. In order for this to happen automatically at startup:
$ sudo chmod +x /bin/fusermount
$ mkdir /home/giuseppe/remote
$ sudo modprobe fuse
$ sudo cp /etc/modules /etc/modules_bakNow the actual mounting:
$ sudo sh -c "echo 'fuse' >> /etc/modules"
$ sshfs the.remote.machine:/shared/path /home/giuseppe/remote
Iscriviti a:
Post (Atom)