-
Passenger On Board
7. April 2012
In my first approach I was running the Sinatra app for the REST API of my blog (for ratings etc.) from command line. This has the drawback that the HTTP daemon integrated in Sinatra listens on a different port than the rest of the blog. This leads to same origin problems when ajaxing the REST API. To circumvent this I’ve used a small proxy script as a workaround. But now I’ve found Passenger (aka.…
-
Uberblog 1.0
1. April 2012
Two weeks ago I announced that I’ll no longer use Wordpress but a more simple self programmed solution. Now I’m at the point that I can say: I’ve a version with all features I need. The version 1.0. Why did I choose this way? As described in my former post I’ve used Wordpress quite a long time. And I don’t want to rant too much about Wordpress, PHP and the whole universe.…
-
Debian and the Outdated Ruby Gems
23. March 2012
Debian is in my personal opinion the best Linux server distribution ever! I’ve never used something else. But one big drawback is that a lot of stuff is really outdated: With PHP you have to use backports. Java and Maven brings some hassle, too. And now I realized the same problem with Ruby Gems. But there is a solution as described here (german blog post). By default Debian disables the gem update --system to prevent circumventing the Debian packet management system.…
-
Post to Twitter with Ruby
23. March 2012
Just few hours ago I added the feature that new blog posts are posted to my Twitter account. With the twitter gem only a few lines of code necessary: require 'twitter' twitter = Twitter.new({ :consumer_key => 'YOUR_CONSUMER_KEY', :consumer_secret => 'YOUR_CONSUMER_SECRET', :oauth_token => 'YOUR_OAUTH_TOKEN', :oauth_token_secret => 'YOUR_OAUTH_TOKEN_SECRET' }) twitter.update('Hello world!') Shorten URIs with bitly gem is as simple as posting to twitter, too: require 'bitly' Bitly.use_api_version_3 bitly = Bitly.new('YOUR_USERNAME', 'YOUR_API_KEY') short_url = bitly.…
-
Nice Resources For Learning Ruby
19. March 2012
If you ever wanted to start learning Ruby the big question to answer is: Where to star? I recommend Learning Ruby from the Pragmatic Programmers. Documentation for the Core and the Standard Library is available, too. Always a good place to find answers is Stack Overflow.
-
Fuck Of Wordpress
18. March 2012
Wordpress was my first blog software. I used it since roundabout six years now. Writing an own plugin for my blog was one of my first steps learning PHP. After my experiences with Java 1.4 and MS Visual C++ 6.0 from 2002 until 2005 I came over to the web scripting area and got in touch with PHP. The new OOP features and the short round trip time I liked.…