Approximity blog home
393 to 402 of 801 articles

Unison file synchronisation for modern computer nomands   18 Nov 05
[print link all ]
Do you know this scenario? Got some files on your laptop, some on your desktop machine at home, some in the office, some on server X? If that is the case, it’s high time you become an addicted Unison user. Unison is pure firelsynchronisation for Unix and for windows.

It allows two replicas of a collection of files and directories to be stored on different hosts (or different disks on the same host), modified separately, and then brought up to date by propagating the changes in each replica to the other.

Unison shares a number of features with tools such as configuration management packages (CVS, PRCS, Subversion, BitKeeper, etc.), distributed filesystems (Coda, etc.), uni-directional mirroring utilities (rsync, etc.), and other synchronizers (Intellisync, Reconcile, etc). However, there are several points where it differs:

  • Unison runs on both Windows and many flavors of Unix (Solaris, Linux, OS X, etc.) systems. Moreover, Unison works across platforms, allowing you to synchronize a Windows laptop with a Unix server, for example.
  • Unlike simple mirroring or backup utilities, Unison can deal with updates to both replicas of a distributed directory structure. Updates that do not conflict are propagated automatically. Conflicting updates are detected and displayed.
  • Unlike a distributed filesystem, Unison is a user-level program: there is no need to modify the kernel or to have superuser privileges on either host.
  • Unison works between any pair of machines connected to the internet, communicating over either a direct socket link or tunneling over an encrypted ssh connection. It is careful with network bandwidth, and runs well over slow links such as PPP connections. Transfers of small updates to large files are optimized using a compression protocol similar to rsync.
  • Unison is resilient to failure. It is careful to leave the replicas and its own private structures in a sensible state at all times, even in case of abnormal termination or communication failures.
  • Unison has a clear and precise specification.
  • Unison is free; full source code is available under the GNU Public License.

Rails: Clean your temporary files   17 Nov 05
[print link all ]
To get rid of all old sessions I addeded this to my hourly crontab job.
 /usr/bin/find /tmp/ -name "ruby_sess*" -cmin +600 -exec rm \{} \;

RailsExpress.blog   17 Nov 05
[print link all ]
How to make your rails app run reeeeeally fast!

Stefan Kaes setup a blog about his activities related to his efforts in improving the speed of Rails apps.

How to fund a startup   17 Nov 05
[print link all ]
Paul Graham of ViaWeb and Y Combinator fame has written a nice summary on how to fund a startup. Recommended

Agile Dilbert   16 Nov 05
[print link all ]
Even Dilbert has to face agile methods. Great story.

Some good Haskell IRC quotes   16 Nov 05
[print link all ]
Enjoy

script/console -- the rails irb   14 Nov 05
[print link all ]
Few rails users know that script/console exists. It lets you interactively explore your rails application. It is quiet similar to irb.

It can help to avoid a lot of browser reloads and so ultimately speed up developmpent even further. It’s a great debugging tool, and it’s fun to play with your objects in real time. But even better; you can use it to get work done. You have full access to your models.

 >> u=User.find_by_username('m94asr')
 => #<User:0x23b34b0 @attributes={"username"=>"m94asr",
   "firstname"=>"Armin", "id"=>"1", "surname"=>"Roehrl", "password"=>"XX"}>

 #reload your code
 load 'sample.rb'
 sample.do_sth

Start the console with the console script:

 ruby script/console

If you start it without arguments the script will start the console in the development environment. To get to the production DB type

 ruby script/console production

MySQL new style password hashing   14 Nov 05
[print link all ]
If you are using rails with a newer mysql version you get an error message when trying to connect to mysql. database.yaml includes this link.

Basically you need to enter:

 mysql> SET PASSWORD FOR
     -> 'some_user'@'some_host' = OLD_PASSWORD('newpwd');

Code Snippets: ruby on rails   13 Nov 05
[print link all ]
Some useful Ruby on rails snippets.

Session Container Performance   13 Nov 05
[print link all ]
I came by accident across this interesting study by ScottBarron.

The Ruby on Rails application framework provides several options for storing session data. Each option has its advantages and disadvantages which may not be readily apparent. The tests outlined in this document attempt to lay some groundwork which should help when determining which storage container is most suitable for your application.

I highly recommend reading it!

 

powered by RubLog
393 to 402 of 801 articles Syndicate: full/short
A unique and safe way to buy gold and silver