Great e-Commerce but the degree of separation between presentation and logic is about 10 folders from root (if you are a developer). I use vim for everything and it can get pretty annoying to work on Magento. So I present to you my .bashrc snippet:
alias pd=pushd
alias pop=popd
function cs() { cd `dirs -l +$1`; }
Go to code directory and do 'pd .' and go to templates directory and do 'pd .'. This will add presentation and logic folder to a linux directory stack which you can access via 'cs 1' or 'cs 2' or 'cs N' N being whatever folder is in the stack.
Thursday, July 1, 2010
Friday, April 9, 2010
File versioning the Git way
One of my favorite features of Git is the ability to create local repositories. Subversion can be a hassle for many multiple projects I go through. The repositories have to live on one central server which stays in constant sync with development. If you've ever tried to merge changes in Subversion with conflict code in repository no need to raise your hand. I can tell by the gray hairs who you are.
Additionally this will work with any file type and will not induce additional load on file server. All the versioning changes will be stored locally and if the need arises, can be pushed out to a central hosting server.
Getting started with Git on Mac/Linux is very easy: http://code.google.com/p/git-osx-installer/
Getting started with Git on Windows is not too bad: http://gitcasts.com/posts/git-on-windows
The basics are:
1) Make directory (mkdir project1)
2) Initialize with git to get started (git init)
3) Add your files in there (git add .)
4) Commit changes (git commit -a -m 'My first git project'). Do this as many times as you want after changes.
There you go, code versioning locally without subversion. Home page for Git and a great source of documentation can be found here: http://git-scm.com/
Sunday, January 10, 2010
CentOS 5, Python 2.5 and a first post
So everyone is doing it and so am I. Can't have street cred these days unless you have a blog, Facebook, iPhone app and a Twitter account. So my first one is on CentOS 5.4 and Python 2.4, yeah, also know as RedHat Enterprise Museum. The nice thing about running a proven package such as CentOS is that hardly ever something breaks and then I have more time to drink beer. But, today I ran into a problem of actually needing Python 2.5 and I dared the source install (note: I am good at this but see above reason why I like proven packages). So, without further ranting:
wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar -xzvf Python-2.5.4.tgz
cd Python2-5
./configure
make
make altinstall (important to have 2.4 and 2.5 run side by side)
cd /usr/bin
mv python python_org
ln -s /usr/local/bin/python2.5 python
At this point I knowingly broke yum since it has a dependency on 2.4. So,
cd /usr/bin
mv yum yum_org
vi yum
and add this to top:
#!/usr/bin/python2.4 instead of #!/usr/bin/python
Then install setuptools for Python2.5 and you're done. When installing packages simply call easy_install-2.5 or relink easy_install.
This is not recommended unless you really know the consequences and how to deal with them. Most Linux distribution rely heavily on Python for several utilities so if they originally shipped with 2.4 there is probably a good reason for it. Most of my main utilities are build from proven scripts so I am not going to loose sleep over this one and for now the engine rolls on.
Cheers
B
wget http://www.python.org/ftp/python/2.5.4/Python-2.5.4.tgz
tar -xzvf Python-2.5.4.tgz
cd Python2-5
./configure
make
make altinstall (important to have 2.4 and 2.5 run side by side)
cd /usr/bin
mv python python_org
ln -s /usr/local/bin/python2.5 python
At this point I knowingly broke yum since it has a dependency on 2.4. So,
cd /usr/bin
mv yum yum_org
vi yum
and add this to top:
#!/usr/bin/python2.4 instead of #!/usr/bin/python
Then install setuptools for Python2.5 and you're done. When installing packages simply call easy_install-2.5 or relink easy_install.
This is not recommended unless you really know the consequences and how to deal with them. Most Linux distribution rely heavily on Python for several utilities so if they originally shipped with 2.4 there is probably a good reason for it. Most of my main utilities are build from proven scripts so I am not going to loose sleep over this one and for now the engine rolls on.
Cheers
B
Subscribe to:
Posts (Atom)