Postgres earthdistance vs PostGIS

I needed to calculate the distance between to . I have found couple of methods. 1. Postgres earthdistance you need to install the contrib package for postgres. Import the cube.sql and the earthdistance.sql. More about this at postgresql docs psql -d...

emacs commenting lines

I was wondering if the comment-dwin (M-;) command could be changed that if i am anywhere in the line the whole line is commented and not a comment started from the end of the line. based on the idea found in a mailing list i altered the command with ;;...

Install Emacs from source on MAC OS X

How to install from source? You will need Xcode tools to perform this operation. MacBook-Pro: mkdir src MacBook-Pro: cd src MacBook-Pro: cvs -z3 -d:pserver:anonymous@cvs.sv.gnu.org:/sources/ co MacBook-Pro: cd MacBook-Pro: ./configure --with-ns...

Hidden files

open a terminal and run the following to show hidden files MacBook-Pro: defaults write com.apple.Finder AppleShowAllFiles true MacBook-Pro: killall Finder to hide them run the following MacBook-Pro: defaults write com.apple.Finder AppleShowAllFiles false MacBook-Pro:...

MAC OS X filling up free space

MAC OS X filling up free space

I have my MacBookPro for 1 year now, and recently I had to often the message that my MAC OS X HDD is running out of space, and effectively finder said ZeroKB, df -h 0 available. As I was installing quite a lot of apps for test during the last year, I have decided to...

http monitoring with God

A few more line to the monitoring of yesterday [...] w.restart_if do |restart| restart.condition(:http_response_code) do |c| c.host = 'localhost' c.port = port c.path = '/' c.code_is_not = 200 c.timeout = 3.seconds c.times = [2, 5] end...

still this performance issue

Unfortunately my previous solution was only temporary, after a while I mentioned that mongrels are eating the memory and hanging. What is sure is that rails is using up to too much memory and crashes, it even seams to be a known problem, (wonder why I have not found...