Skip to main content

Posts

Drupal themes to look for

http://drupal.org/project/dropshadow http://drupal.org/project/changeme http://drupal.org/project/mpFREE http://drupal.org/project/toasted http://drupal.org/project/tivity http://drupal.org/project/zenland * http://drupal.org/project/purple_box http://drupal.org/project/nerdalistic http://drupal.org/project/skyroots to be continued - http://drupal.org/project/Themes?page=28

Postgresql cluster on Ubuntu

When having two versions of PostgreSQL on the same machine, need to use --cluster option for all psql command - psql, createuser, createdb, dropdb etc. The format is:- psql --cluster version/cluster $ pg_lsclusters Version Cluster Port Status Owner Data directory Log file 8.3 main 5432 online postgres /var/lib/postgresql/8.3/main /var/log/postgresql/postgresql-8.3-main.log 8.4 main 5433 online postgres /var/lib/postgresql/8.4/main /var/log/postgresql/postgresql-8.4-main.log $ psql --cluster 8.4/main mydb

dnsmasq for local virtual network

Setting up local virtual network with VirtualBox. The setup:- Main Host eth0/bridged mode listen on 192.168.1.200. Connected to the real local LAN. eth1 listen on 10.0.0.1 - dnsmasq dhcp listen here. Sub internal host app2 - eth0/internal network 10.0.0.2 db - eth0/internal network 10.0.0.3 /etc/dnsmasq.conf setup so that the dhcp assigned the IP address from /etc/hosts for any matching hostname. dhcp-host=app2,db But the client still getting the lease in dhcp-range rather than the one set in /etc/hosts. Turn out we need to set "send host-name app2;" in /etc/dhcp3/dhclient.conf because dhclient does not send the hostname by default when acquiring the lease.

Makefile notes

On changing directory in Makefile:- Each command in a makefile is executed in its own shell. To execute three subcommands in the same shell, write them all as a single command. For instance, if your shell uses ';' as a subcommand separator, you might write http://www.mail-archive.com/help-make@gnu.org/msg07671.html

Drupal Install Profile

Collecting resources on Drupal install profile:- Fix some conceptual problems with install profiles and make them actually usable Some of the Hot Sauce Behind Open Atrium: Installation Profiles + Features Reason on why './profiles' stay at the same level as './site' and not under './sites/*/profiles':- Search for profiles in site folders An attempt to use module as an alternative to install profile:- Simpler Alternative to Install Profile

Buildout custom Python interpreter

Menggunakan Buildout , kita boleh generate custom Python interpreter khusus untuk kegunaan projek buildout ini dengan sys.path disetkan kepada eggs dalam projek ini. Berikut contoh buildout.cfg yang digunakan:- [buildout] newest = false parts = pylons python find-links = http://pylonshq.com/download/0.9.7 develop = . [python] recipe = zc.recipe.egg interpreter = python [pylons] recipe = zc.recipe.egg eggs = nose>=0.11.1 Paste>=1.7.2 PasteScript>=1.7.3 PasteDeploy>=1.3.3 Pylons==0.9.7 SQLAlchemy==0.5.5 Jinja2==2.1.1 Tapi apabila run, dapat error:- We have no distributions for python that satisfies 'python'. Getting distribution for 'python'. We have a develop egg: setuptools 0.6c9 Running easy_install: /usr/bin/python "-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" "/home/kamal/webapps/clinic-pylons/eggs/tmpflXKv-" "-q" "/usr/lib/python2.5/lib-dynload...

easy_install read pip requirements.txt file

No way to feed PIP requirements file into easy_install , so the following snippet do the job:- import os f = open("requirements.txt") reqs = f.read().split("\n") for req in reqs: # ignore comments or pip options if req.startswith('--') or req.startswith('#'): continue # ignore blank lines if len(req) > 0: os.system("easy_install %s" % req)