Wednesday, May 13, 2009

Pylons :: how to build environment :: Ubuntu

Few days ago I was fighting with new pylons, now it's a time to describe how I built my new environment...


cd /mnt/
mkdir python2.5-env
cd /python2.5-env/
mkdir project
cd project
easy_install-2.5 virtualenv
sudo easy_install-2.5 virtualenv
virtualenv --no-site-packages --clear .
/mnt/python2.5-env/project/bin/easy_install pylons
/mnt/python2.5-env/project/bin/easy_install -U pylons


and sqlalchemy

/mnt/python2.5-env/project/bin/easy_install -U sqlalchemy


and mysql

/mnt/python2.5-env/project/bin/easy_install mysql-python


That's all!


now we just need to run our application:

/mnt/python2.5-env/project/bin/paster serve --reload some_config_file.ini

Labels: , , ,

develway.pl add this news to develway

Recursive delete files/folders :: linux

For directories (in this example we want to delete directory '.svn')...

find /some_path -type d -name ".svn" -exec rm -rf {} \;


for files (in this example we want to delete file 'file.exe')...

find /some_path -type f -name "file.exe" -exec rm -rf {} \;

Labels:

develway.pl add this news to develway

Change string in multiple files :: linux

Just type a command...

grep -rl old_string . | sort -u | xargs perl -pi~ -e 's/old_string/new_string/'

Labels:

develway.pl add this news to develway

Video files with Google Picasa app on Linux

Firstival... Linux's Google Picasa app can't manage video files (what a shame...)

But we can always find some kind of solution...

  1. run VirtualBox
  2. add files to your windows machine
  3. install google picasa app for windows
  4. upload/manage your video files
  5. the end.

Labels: , , ,

develway.pl add this news to develway

VirtualBox and shared files/directories

VirtualBox is really great!
You don't need any apps like ie4linux/photoshop on wine anymore.


You can just run your 'windows machine' on linux.

http://www.virtualbox.org/

And what about coping files/directories between linux-windows machine on virtualbox?

It's not so hard...

  1. install VBoxGuestAdditions
  2. run windows machine in virtualbox
  3. in bottom right corner there as an icon for shared folders, click on it (right button)
  4. add folder you want to share -> OK
  5. open any directory in windows
  6. Tools -> Map Network Drive
  7. click on 'browse' and find 'VirtualBox Shared Folders'... click twice on it/right-click and 'open'
  8. now you can make a shortcut or just manage your linux's folders from windows machine
  9. the end.

Labels: , ,

develway.pl add this news to develway