Author Archives: Morten

Create GeoJSON in php

GeoJSON is a text format for encoding various geographical structures. I have a large number of point data with various extra information stored in a postgresql data base. I fetch all the data into an array in php, using PDO::FETCH_ASSOC, … Continue reading

Posted in Diverse | Comments Off on Create GeoJSON in php

Eplelogg 2013

Eplepressingen er i gang igjen, nå med nyinnkjøpt kvern 13. oktober 12+16 kg james grieve presset til 15 liter juice 27 oktober 32 kg James Grieve presset til 19 liter juice 8 kg James Grieve + 8 kg torstein 9 … Continue reading

Posted in epler | Comments Off on Eplelogg 2013

Eplepresserioppgradering

Årets oppgradering i eplepresseriet er en fruktkvern. til erstatning for tidligere bruk av en vanlig kjøkkenmaskin Etter to runder med pressing må det sies at dette var en svært god investering. Jeg plasserte kvernen oppå en plastkasse og satt en … Continue reading

Posted in epler | 2 Comments

Postgres in python using flask-psycopg2

Not the most well-documented module I’ve ever seen… To make it connect to your database of choise, in the app-settings, feed in PSYCOPG2_DATABASE_URI=”pgsql://dbuser:dbpassword@dbhost/database” e.g. PSYCOPG2_DATABASE_URI=”pgsql://postgres:Secr1tPsswrd@localhost/postgres”

Posted in Diverse | Comments Off on Postgres in python using flask-psycopg2

.44 magnum cortado

When Clint Eastwood shows up in the foam, the coffe is strong enough to defend itself. Continue reading

Posted in Diverse | Comments Off on .44 magnum cortado

Gymtider

Gymtimene på 80-tallet var for de sterke og minnene kommer strømmende på. Gymlæreren min i 2. og 3. vgs hadde stor tro på at langdistanseløp var det eneste saliggjørende. Ut for 5000m på Bislett. Han sto på kanten og sekunderte. … Continue reading

Posted in Diverse | Comments Off on Gymtider

Client based web-mapping

Maps with R – part III shows how to make an active svg-map from R. In that example, a specialiced data set was used. I have redone it by using a map pulled in from postgis and also added on … Continue reading

Posted in Diverse | Comments Off on Client based web-mapping

Om å lage en scene

Enhver hage med respekt for seg selv bør ha en festival fra tid til annen- og da trenges det en scene. Vår scene blir bygget hovedsaklig av 2″x6″,det er mulig det kunne holdt med 2″x4″, men det var nå en … Continue reading

Posted in Diverse | Comments Off on Om å lage en scene

Automatic datavalidation in postgres

How to stop bad data from propagating – automatically check what goes into a postgres database Continue reading

Posted in Data | Comments Off on Automatic datavalidation in postgres

How to move a VboxManager virtual machine to another host

Officially, to move a vbox virtual machine to another host, you have to clone it. But – what if vboxmanager for some reason has stopped working on the host you want to move the vms from? Continue reading

Posted in Data, linux | Comments Off on How to move a VboxManager virtual machine to another host