Smaller Update

Posted by Gregor Schmidt
(2010-03-14)

I just wanted to let you know, that this blog just moved from mephisto to jekyll. This move will make it easier to keep the content online. While I was quit lazy in the past years, I also do not plan to get much more active, in the forcoming future. Having static pages, served by a rock-solid apache web server, will be much more reliable, then the old mongrel + mod_proxy_balance setup.

Unfortunately I was not able to keep the comments. There were not many of them, so I might copy them manually. All future post will not receive any. I you want to comment on the posts, you may want to send an email. Apart from that, this site will become a one-way street.

Seven Things

Posted by Gregor Schmidt
(2009-01-23)

It was way too long ago, that this site was updated. Sorry for that. Let’s use this meme as opportunity to start again.

These are the rules:

  • Link your original tagger(s), and list these rules on your blog.
  • Share seven facts about yourself in the post — some random, some weird.
  • Tag seven people at the end of your post by leaving their names and the links to their blogs.
  • Let them know they’ve been tagged by leaving a comment on their blogs and/or Twitter.

And here are the facts:

  1. “The Ruby Ahead” is a more or less obvious variation of “The Road Ahead” - A book by Bill Gates covering the his thoughts on the development of broad band internet, cloud vs. desktop computing and general predictions.
  2. I really liked writing blog entries about my master’s thesis, but writing the thesis itself was the horror.
  3. I still owe Christian Neukirchen a paper copy of my thesis. He gave me permission to use the name ContextR and I promised to send him a copy in turn.
  4. I’m using pons.eu to write this article.
  5. I’ve just developed my first mobile website. Everybody complaining about IE6 should be glad.
  6. The movie “Forrest Gump” brings tears to my eyes regularly.
  7. I really dislike these kinds of “Stöckchen” or chain letters.

Concerning the 7th fact I will disobey the laws and not torture 7 others with this kind of stuff.

Done

Posted by Gregor Schmidt
(2008-04-16)

Today I finished my master’s thesis. Hooray. The title is “ContextR & ContextWiki - Modularisierung von Webanwendungen mit kontextorientierter Programmierung” or “Modularization of Web Applications Using Context-oriented Programming”. An abstract will be available, after it was graded. The full version will be public as well, although I’m not sure when.

In the mean time, you might be happy with the code. ContextR and ContextWiki are available at github.

Euruko 2008

Posted by Gregor Schmidt
(2008-03-19)

I will happily attend the Euruko 2008 in Prague. Hope to see you there.

Mechanize Use Case

Posted by Gregor Schmidt
(2008-03-16)

I’m using www.bibsonomy.org to manage my bibtex entries. This is a must have, when writing any scientific paper. Bibsonomy is like del.icio.us just for bibtex. Among the social and webscraping features to collect bibliography entries it has a bibtex export to create .bib-files for your local latex project.

The problem, we will solve today: Fetch the bibtex export from bibsonomy.

The older solution:

wget http://www.bibsonomy.org/bib/user/schmidtwisser?items=1000 -O literatur.bib

This solution is simple and was useful for a long time. Unfortunately I recently added private bib-entries. Since this solution doesn’t use any authentication, it only delivers my public entries.

Mechanize

So I needed to either use bibsonomy’s API, which would need registration, or I need to authenticate, keep the cookie and then fetch my bibliography. Enter mechanize:

require "rubygems"
require "active_support"
require "mechanize"

config = YAML::load_file(File.join(ENV['HOME'], 
                                   ".bibsonomy.yml")).symbolize_keys

agent = WWW::Mechanize.new
page = agent.get('http://www.bibsonomy.org/')

form = page.forms.action('/login_process').first
form.userName = config[:username]
form.loginPassword = config[:password] 
page = agent.submit(form)

page = agent.get("/bib/user/#{config[:username]}?items=1000")

File.open("literatur.bib", "w") do |f|
  f.puts page.body 
end

It is so easy, I won’t even explain the code.

Just one bit: Don’t embed your password in any public code, so do I. My credentials are therefore stored in my Home-directory.