DRY in your views (RoR)

Excellent tutorial on how to DRY views in Ruby On Rails.

Developers tend to spend a lot of time refactoring their controllers and helpers, but once they get to the views (rhtml), more often than not, the DRY (Don’t Repeat Yourself) hat just disappears. This is not surprising, HTML markup by its very nature predisposes you to repetition of structural tags. However, in certain situations, a little Ruby magic can go a long way. Namely, you should get into the habit of creating block helpers to DRY up your views. Let’s take a look at the often (ab)used case of rounded corners.

…… follow the source to read more !

source

Apt get without internet ?

This tool seems great to achieve this issue : how to apt-get without internet (with all dependencies problems of course) ?

http://aptoncd.sourceforge.net/

Have you ever felt that there is no life without APT? Well, if you’d suddenly lost conection to the internet, how would you install new packages? What about dependencies? You’ve just finished installing Ubuntu and configured it to a rad look, with all your favorite applications? For some reason you now have to re-install it? Feel like you have to download all of your favorite programs again?

Free remote desktop solutions

A very good article about free / open source solutions to manage a remote desktop in a graphical way. Overall, it’s oriented to linux computers, where there is a lack of uniformed or massively adopted solution.

There are a wide range of remote desktop applications that are available that can be used to connect to Windows environment but there aren’t too many that can be used to remote desktop from Linux to Linux or Windows to Linux. With this I mean, getting entire desktop of remote Linux environment on your local workstation.

Most people who are used to a Unix-style environment know that a machine can be reached over the network at the shell level using utilities like telnet or ssh. And some people realize that X Windows output can be redirected back to the client workstation. But many people don’t realize that it is easy to use an entire desktop over the network. There are a couple of open source applications that can easily do this for you.

Here is a short list of applications that can be used.

1) VNC (Virtual Network Computing) is a remote display system which allows the user to view the desktop of a remote machine anywhere on the internet. It can also be directed through SSH for security.

Basically you install VNC server on the server and install client on your local PC. Setup is extremely easy and server is very stable. On client side, you can set the resolution and connect to IP of VNC server. It can be a bit slow compared to Windows remote desktop and also has the tendency to take more time refreshing over low-bandwidth links. All in all VNC is an amazing piece of free software that gets the job done.

There is RealVNC , TightVNC and UltraVNC. Each has it’s advantages and disadvantages. Most popular one is RealVNC but if you’re upto it, experiment with all three and choose the one that works for you best. By default, communication between client and server is in clear text on port 5900. However, you can easily route all traffic via SSH tunnel. Here is a quick way of setting it up if you have access to command line shell:

ssh -ND 5900 @remote.server.com

When you get prompted, enter your password. Pop open VNC client and connect to ‘localhost’. This’ll route your connection to VNC server on remote machine.

You can download VNC from:

  1. http://www.realvnc.com/download.html
  2. http://www.tightvnc.com/download.html
  3. http://www.uvnc.com/

2) Then there is FreeNX. FreeNX is a system that allows you to access your desktop from another machine over the internet. You can use this to login graphically to your desktop from a remote location. One example of its use would be to have a FreeNX server set up on your home computer, and graphically logging in to the home computer from your work computer, using a FreeNX client. It provides near local speed application responsiveness over high latency, low bandwidth links.

FreeNX can be configured to run via SSH without any tunneling. It binds to your existing SSH install. Instead of guiding you through the installation of FreeNX in this article, you can visit the following URLs that’ll guide you through the installation on Ubuntu:

  1. https://help.ubuntu.com/community/FreeNX
  2. http://ubuntuforums.org/showthread.php?t=97277&highlight=freenx
  3. http://freenx.berlios.de/ (FreeNX homepage)

3) The third free application is 2X Terminal Server for Linux. 2X TerminalServer for Linux is an Open Source project, licensed under the GPL and is free of charge. As far as performance goes, NoMachine’s technology is on par with Windows’ own Remote Desktop Protocol (RDP) suite, better than VNC. Both X2 and FreeNX is based on NoMachine technology.

Here are some quick links if you’re interested in using this software:

  1. Download at http://www.2x.com/terminalserver/download.htm
  2. Forum is at http://www.2x.com/forums

4) The last but not least at all is XDMCP. The X Display Manager Control Protocol uses UDP port 177. Compared to the list above, it’s not as easy to setup for remote desktop but it’s the original way of doing this on Linux. You can get setup instructions and other tips in the following URL:

  1. http://www.tldp.org/HOWTO/XDMCP-HOWTO/intro.html

In conclusion, there are many commercial products that are available as well. But this article is only based on open source products that can be freely used with no strings attached.

source

Association pour le Maintien de l’Agriculture Paysanne

Une Association pour le Maintien de l’Agriculture Paysanne est un partenariat entre un groupe de consommateurs et une ferme, basé sur un système de distribution de « paniers » composés des produits de la ferme. C’est un contrat solidaire, basé sur un engagement financier des consommateurs, qui payent à l’avance une part de la production sur une période définie collectivement.

http://www.alliancepec-rhonealpes.org/site-all/article.php3?id_article=10 

Les fournisseurs de paniers primeurs sur la région Rhone Alpes :

http://www.alliancepec-rhonealpes.org/site-all/article.php3?id_article=39