woensdag 22 oktober 2008

Great presentation on oracle databases

This is a must read for everyone who does anything with oracle databases.
More often than not you find yourself in projects where developers see the database as their enemy. People who know me, know what I'm talking about ;)

vrijdag 4 juli 2008

OpenID

You certainly know the problem: you have literally hundreds of websites asking you to invent a username and a password, which you'll have to remember potentially weeks or even months later. Well there's a solution:




OpenId works as follows :
1. You log into a website with your openid "URL" : Mine for example is http://kserry.blogspot.com/
2. de webpage you want to login to is redirecting you to your provider.
3. on the providers' website you login with your credentials (this is the only you'll have to remember)
4. the providers' website redirects to back to your original website and you'll either be presented with a form (without the fields you allowed your openid provider to see to external parties and without the username/password)

How this works [Technical]

woensdag 2 juli 2008

Migrated pebble to blogger

Thanks to the guys from google we got a API to post items to our blog. Since I've had a pebble blog for some time now, but I don't have access to that server anymore, the time had come to use something with less maintenance (read none).

Hereunder you can find the code I've used to migrate the entries. Note: There are 2 steps 1. use an xslt to transform the pebble xml to an 'atom' xml. 2. use the python script to upload The xslt


<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:template match="/blogs">
<xsl:for-each select="blogEntry">
<entry xmlns='http://www.w3.org/2005/Atom'>
<published><xsl:value-of select="date"/></published>
<updated><xsl:value-of select="date"/></updated>
<category scheme="http://schemas.google.com/g/2005#kind" term="http://schemas.google.com/blogger/2008/kind#post"/>
<title type='text'><xsl:value-of select="title"/></title>
<content type="html"><xsl:value-of select="body"/></content>
<author>
<name>Koen Serry</name>
<uri>http://www.blogger.com/profile/03836830737950982447</uri>
<email>koen.serry@gmail.com</email>
</author>
</entry>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet> 
Here is the python script.
import httplib,urllib,re
from string import Template

params = urllib.urlencode({'Email': '', 'Passwd': '', 'service': 'blogger', 'source': 'exampleCo-exampleApp-1.0'})
headers = {"Content-type": "application/x-www-form-urlencoded"}
conn = httplib.HTTPSConnection("www.google.com")
conn.request("POST","/accounts/ClientLogin",params,headers)
response = conn.getresponse()
print response.status
data = response.read()
conn.close()
print data

auth = re.search('Auth=(.*)$',data).group(0)
print auth


s = Template("""

$header
$payload

Koen Serry
http://www.blogger.com/profile/03836830737950982447
noreply@blogger.com

""")


f = open("blog.txt")
title = f.readline().rstrip()
content = " ".join(f.readlines())
params = s.substitute(header=title,payload=content)
headers = {"Authorization": "GoogleLogin auth="+auth,'Content-Type': 'application/atom+xml'}

conn = httplib.HTTPConnection("www.blogger.com")
conn.request("POST","/feeds//posts/default",params,headers)

response = conn.getresponse()
print response.status
data = response.read()
conn.close()
print data

maandag 30 juni 2008

Rhodos

Ahh, well earned holiday on Rhodos. As you can see my son grew up quite a bit and is able to walk already.

dinsdag 12 februari 2008

Maven2 just got 2 great improvements

Maven2 recently got 2 big improvements.


mvn archetype:create

allows you to create a new project from scratch and start with an existing project infrastructure that you can easily adapt. Previously you had to pass options in via the infamous -D parameter, now it guides you through some kind of wizard.



The other enhancement I just read on Brett Porters website where you will in a future release be able to condense your xml in the pom to attributes (more info here)
Finally you'll be able to see all your dependencies without having to scroll for ages :)

zaterdag 9 februari 2008

Even quieter than before.


The project I'm currently doing in my day-job went live this week. So plenty of work (as well as hours), but fortunately the dust is finally settling down.