About

This site is a place for us Byte Craft folks to dump, blog, rant about and host various stuff related to our work. Han, also known as angch, maintains this site. This is also site for us to experiment various things so there might be breakage from time to time. This site also suffers from shoemakers-kids-go-barefoot syndrome, sorry.

angch's picture

Mapnik 0.6.0 Ubuntu Hardy 64bit packages

Backported mapnik 0.6.0 packages (based on Debian unstable's) to Ubuntu Hardy amd64 attached below:

kamal's picture

Drupal: Where's my CCK content get stored in db ?

Wrote about internal CCK storage in my personal blog sometimes ago but looking through issues coming up recently in our issue tracker suggest that some of developers here still not sure where their CCK content are stored in the database. Briefly revising this topic to give some clue on where to look after when something goes wrong with our CCK related content.

helmi's picture

Render road labels, MapGuide vs Mapnik

MapGuide Mapnik
  • Both software configured to tile 256x256
  • MapGuide bad at rendering road name.
angch's picture

#geekcamp Malaysia presentation: A Coder's Intro to PostgreSQL+PostGIS

Gave a quick and dirty talk at #geekcamp Malaysia: A Coder's Intro to PostgreSQL + PostGIS.

This looks like a topic I'd be revisiting and revising as I'm heavily into PostGIS these days, and definitely felt that the I missed several important topics. I'll just put this up here for now, and we'll see how well it improves.

kamal's picture

Drupal: Namespace your CCK fields

Not aware of this until it was too late. All CCK field was stored in a flat container in table node_field. It's not unique per content type. That means you cannot have two fields with a same name although that field was used in different content type. From the UI, if you create field with a same name, it'll just append an arbitrary number such as _0, _1 to make it unique.

angch's picture

VMware workstation keybindings fix in Ubuntu Intrepid

Up/down keys, etc are not mapped properly in a machine hosted by Intrepid, when it was okay running under Hardy.

One fix was to .vmware/preferences, add:

hint.xkeymap.notLocal = "FALSE"
xkeymap.nokeycodeMap = true

Forgot where I got the above from. VMware server uses .vmware/config, if I remember correctly. Also VMware will pop up a warning when you start it.

angch's picture

Self Signed Cert, cheat sheet.

No encrypting ofs erver.key in the first place, so we have one less step. Commands:

openssl genrsa -out server.key 4096
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
cat server.crt server.key > $myserver.pem
Apache config:
SSLEngine on
SSLCertificateFile $myserver.pem
SSLCertificateKeyFile $myserver.pem
nginx config:
ssl  on;
ssl_certificate $myserver.pem;
ssl_certificate_key $myserver.pem;

angch's picture

OpenOffice 3 backports for Ubuntu.

Caveat: following undergoing testing:

Intrepid:

gpg --keyserver keyserver.ubuntu.com --recv-key 60D11217247D1CFF
sudo -s
echo "deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main" > /etc/sources.list.d/openoffice
gpg --armor --export 60D11217247D1CFF | sudo apt-key add
apt-get update
aptitude dist-upgrade
apt-get upgrade or dist-upgrade doesn't seem to resolve the dependencies properly.

Hardy: gpg --keyserver keyserver.ubuntu.com --recv-key 60D11217247D1CFF sudo -s echo "deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu hardy main" >

kamal's picture

PHP development server

One thing that I like in various Python frameworks such as Django etc, they come with built-in development server that allow you to start developing the application without worrying much about properly setting up apache and all sort of things regarding deployment. Though personally, I'd prefer developer to have some knowledge in configuring apache (at least in their local environment) having some sort of development server still being useful even for myself.

Syndicate content