home icon contact icon rss icon

Textmode

tools I use

Finally: Passenger/mod_rails for Nginx!

I was really glad to finally read the news that Passenger 2.2.0 now supports my favorite webserver nginx too.

I always wanted to get rid of the somehow apache monster, which is an overkill in some scenarios (imho).

Nginx has a very easy configuration and everything I need.

If you want to test passenger with nginx it’s as simple as:


sudo gem install passenger
sudo passenger-install-nginx-module

# edit the default config:
sudo vi /opt/nginx/conf/nginx.conf

# start nginx
sudo /opt/nginx/sbin/nginx

There is also a Peepcode Screencast explaining the steps.

I’m happy :)

Ruby 1.9.1 and Rails fails - at least according to Google..

Google seems to know something about the new Ruby 1.9.1 release regarding Ruby on Rails:

The question is, does Google suggest “fails” as a correction for “rails” because the word is similar – or because the combination is typed in a lot? :)

Piwik - the best website statistics system

I created multiple sites during the last few weeks, and wondered what’s the best website statistics solution to use with them.

My requirements are:

  • API/XML Export (I’m collecting the statistics in a central application)
  • Realtime (almost)
  • all the metrics I usually need (popular pages, referrer sites, entry pages, etc)

As mentioned here before, I used Clicky for a while, and I have to say it’s one of the best systems I know. Unfortunately the free edition is quite limited (regarding my needs): No API, Limited Sites and Tracking. However, I still use it on this and another site.

I then came across GoingUP which is quite nice too and has a free API. But again it was limited to a maximum number of visitors/sites. So I had to move on ..

I’m now using Piwik which is by far the best website statistics system I know.

It aims to be an open source version of Google Analytics:

Piwik is PHP and MySQL based, but that shouldn’t be a problem if you have a usual webserver somewhere.

You can then track multiple (remote) sites by including a short snippet. Piwik also has a very nice API featuring different output formats like XML, JSon, HTML etc and even a very nice Plugin System (if you like to develop in PHP) :)

Give it a try, it has a nice installation Routine and is up in a minute.

Rails and Merb unite

If you did not already read it, there are really cool christmas news on the Ruby on Rails Blog

The Merb Framework – the highly modified framework initially based on/inspired by the rails core and made to improve speed, concurrency and a small footprint – will be merged into “Rails 3.0”.

Let’s look at the Merb feature list to see what this means:

Merb is..

  • ORM-agnostic (through plugins)
  • JavaScript library agnostic (through plugins)
  • template language agnostic (through plugins)
  • thread safe (+ multiple file uploads)
  • simple and optimized core without sacrificing functionality
  • improvements

what I especially like is the modularity of Merb, compared to Rails

This is a rough overview of what Rails 3.0 will look like, having the Merb features:

  • Optionally a minimum and full featured core
  • A lot of performance improvements
  • Framework agnosticism (JS, ORM, template and testing level)
  • A better, more stable API (eg. for plugins)

When will we get Rails 3.0?

I guess this is very hard to predict :) but the goal is to have at least a Beta version ready for RailsConf 2009 in Las Vegas

I totally concur with the post on the ROR Weblog, Rails 3.0 will kick ass!

Seo extensions for Opera

I was looking for some Seo extensions/plugins for my favourite browser, Opera.

This is what I found:

Seo for Opera

Seo for Opera is basically a port of the Seo for Firefox extension to opera. It enhances Google and Yahoo search results by adding additional information to each returned page.

As far as I saw it is not maintained, and sometimes unstable, but it seems to work well.

For detailed Features see Seo for Firefox.

Seobar

Seobar is a Opera userscript that can be used directly on the site in question. It adds an additional layer with information about the site you are viewing.

The information contains:

  • Alexa Traffic Rank
  • Google Page Rank
  • Yandex CY
  • DMOZ
  • Yahoo! Directory
  • Yandex.Directory
  • Rambler’s Top100
  • Google backlinks/pages
  • Yahoo backlinks/pages
  • MSN backlinks/pages
  • Yandex backlinks/pages

It also adds title/description for some results.

Here is an image of the layer, displaying backlinks:

Visualization of Feeds - FeedVis

Data visualization is really interesting, and there are a lot of new, web-based tools coming up in the datamine sector.

I came across FeedVis recently.

FeedVis allows to visualize data from feeds, which can be divided into feed- or time-subsets.

The data is presented in a very nice, graphical way. For each word, some additional information is provided:

  • Summaries
  • Headlines
  • Word Frequency in content
  • Frequency Change (Trend)

Quite cool to play around with, and looking much better than the usual tag clounds :)

FeedVis is available for download

Google Friend Connect and Facebook Connect

Two interesting tools to play around with, released almost at the same time:

Google Friend Connect

Google Friend Connect let’s webmasters add a social layer to their site – without any programming effort. The only thing you have to do is include the functionality in your markup.

Based on widgets it enables visitors to “sign up” for sites using Friend Connect, using a variety of authentication mechanisms:

  • Google
  • Yahoo
  • AIM
  • OpenID

Once signed up, you get the full functionality of Google Friend Connect.

This includes:

  • Interaction with other visitors (making friends, shoutbox)
  • Interaction on the site (sharing media, posting comments, playing games, etc)
  • Invite Contacts to join the site too

An example (featured by Google) is billboardforthepeople.com

Google Friend Connect is a very general approach, trying to cover a wide area. Users can interact without really being in an existing social network (like Facebook, etc).

The only thing I missed when looking at Friend Connect for the first time, is a list or gallery of the available widgets. Please drop a comment if you know if something like this exists.

Facebook Connect

Facebook Connect on the other side, enables developers to integrate the Facebook functionality into other sites.

The main features here are:

  • Trusted authentication (using facebook user credentials)
  • Real identity (integrate visitors facebook identities into your site)
  • Friend linking (let visitors find facebook friends on your site)
  • Dynamic privacy (include visitor information and privacy settings)
  • Social distribution (allow visitors to share information and actions)

As you can see Facebook Connect is a bit more specific, the orientation here is towards developers that want to integrate Facebook functionalty. I think this is a great tool, not only in combination with existing Facebook applications.

therunaround is an example they provide.

Frustriation with Linux Console Newsreaders

Okay, currently I’m using Snownews as my main newsreader for RSS feeds. Yes, RSS, not Atom because Snownews is one of the rare feedreaders that does not support Atom feeds.

Although people keep saying that this is no problem because there is a cool extension named atom2rss I have to ask myself a question:

This extension exists for quite a while, why don’t they simply integrate support for Atom Feeds?

Besides that, I tried using this extension, which is in fact a filter based on xsltproc (...) which still fails. I know most people might argue that this is Open Source Software, which is of course right, but that doesn’t mean I’ve got the time to finish every piece of incomplete, non-functioning software I come across.

This will probably lead most people to something like “you don’t have to use it, do you?”. And that’s right, I’m using it because it’s the only textbased feedreader for linux I know that has the following features:

  • VIM Keybindings (or configurable keybindings)
  • Category Support
  • and as mentioned, is no X11 application

But I’m frustrated by the missing atom support, and it obviously often misinterpretes the date in a feed.

I don’t want a discussion wether or not this critique is appropriate, or is based on some bugged version, my question is:

Can anyone suggest a textbased feedreader with the above features that supports Atom AND RSS?

I tried raggle, canto and nrss, but they didn’t not satisfy me, so I’m still using snownews for rss, and canto for atom – which sucks.

Edit: Using canto now, which is now almost perfect for my needs.

Drawter - Drawable Markup Language

Yesterday I came across Drawter.

Drawter allows you to draw your HTML/CSS Markup,it is a Javascript application written with the jQuery library. Although it might look like yet another WYSIWYG HTML Editor it is not, it is the best web-based application for the interactive creation of Markup I know.

This picture is taken from the screencast:

Currently Drawter is in Beta 2 stage, but it has already some pretty cool functionality. Plus it is very stable, and works in all browsers .

It is mentioned that there will be an upcoming release called Amateurs which will enable users to “draw” websites without any knowledge of HTML or CSS.

I think this tool is quite useful if you want to quickly create prototypes or Website drafts.

Go check it out: Drawter, there is also a Screencast for a basic overview.

Selecting Text (Copy/Paste) in Elinks

Just a quick note, since I came across some articles with statements like ”... unfortunately Elinks does not support text selection, or copy and paste...” which is simply wrong.

Elinks does support text selection, you just have to press the Shift key when selecting.

Another common question is: Is it possible to select text without a mouse in elinks, using the keyboard?

The answer is, elinks does not handle that, it depends on your terminal emulator, which in most cases does not support it, afaik. You have to use the mouse (gdm if you’re not running X)

Official Ruby on Rails Security Guide

Finally there is an official (?) Ruby on Rails Security Guide available, on rubyonrails.org

It seems to be pretty up-to-date and covers a variety of current issues quite detailed.

I consider this a must read for everyone, especially when developing public applications. There is an online version as well as a free e-book available.

There are even more Guides available at guides.rubyonrails.org

Google releases browser - Google Chrome

Two days ago google released the beta version of their very own browser, Google Chrome

Unfortunately there is only a windows version available yet.

The main features are:

  • Per-Tab Processes
  • Very fast Javascript Engine called V8 (Ruby is already running on it :)
  • A special Safe browsing mode
  • and a lot more

Since the privacy policy is quite special, there have already been some discussions and complaints.

Furthermore there are already some exploits :)

Seems as if the development of chrome will be quite interesting.

Clicky - Powerful website statistics with API

I like to visualize visitors on my websites, and I was looking for a realtime google analytics alternative some months ago.

Since I also like to do custom calculations or visualizations on some sites, an API for my stats would be quite helpful.

I came across a nice little service called Clicky

It has a free plan which is limited but very usable, and a payed plan that gives you a couple of additional features like API support, Realtime Spying etc.

Some core features:

  • API support
  • Multiple Sites
  • XML and CSV Export
  • Trends
  • RSS Feed

I think the best way to quickly go through the features of a tool to visualize visitors is to go through it with a couple of screenshots. It’s based on todays statistics of this site, here we go:

Dashboard – a general overview

The dashboard view gives you a basic overview of your site statistics including some nice graphs. You can add additional widgets like embeddable google maps visualization, desktop sidebars, top visitors lists, and wordpress plugins.

Visitors – who visits your site?

The second tab, visitors, shows some very useful information about your visitors. As you can see below the default is a list including origin, browser and platform information and search engine keywords that were used in the query, referrer and user actions (see below).

Additional views provide google maps visualization, recurring visitors and various lists sorted by specific categories.

Actions – what are they doing?

The actions tab gives you an overview of user activity, basically a list of urls a user visits on your page.

Content – which pages are viewed the most?

This tab contains content statistics. Useful to determine the main entrance and exit pages, and then optimize pages that have a low ranking.

Links – who points to my site?

The links tab shows pages that link to your site, and sorts them by visits you get from these sites. Quite useful to see what others write about you :)

Searches – how do visitors get to my site?

It’s quite useful and interesting to see how visitors get to your site. This tab provides statistics about search terms (search engine keywords) visitors are using. A search engine top list is available too, but I guess google dominates on almost every site :)

All these features are available in the free edition, so clicky is a real good google analytics replacement with nice graphs.

Spy

The spy tab is, besides other features, only available in the payed subscription and gives you a real time, ajaxified, list of users visiting your site. Quite funny to watch sometimes :)

I think I really found exactly what I need with clicky, I’m very satisfied.

Check it out, if you need a good website statistics tool.

Factory Girl - Rails fixture replacement

I think you all know that, when using fixtures in your test, you keep switching between files to see what fixtures there are, always struggling with dependencies and conflicts.

There are a couple of helpers that solve this, but this is the best one I came across until know: Factory Girl

As the names says, it provides some kind of factory for your objects and instances.

The following snippet illustrates the definition of such a factory:


# define an incremental username
Factory.sequence :user do |n|
  "user#{n}" 
end

# define a user factory
Factory.define :user do |u|
  u.admin      false
  u.username { Factory.next(:user) } # lazy loaded
end

# define a project factory with associated user
Factory.define :project do |p|
  p.title 'myproject'
  p.creator   {|a| a.association(:user) } # again lazy loaded
end

Now, this factory can be used in your tests:


it "should do something" do
  Factory.create(:user) # creates a user
  Factory(:user) # creates another user (note the shortcut)
  @u = Factory.build(:user, :username => 'customuser') # only build, no save
  Factory.create (:project, :creator => @u)
end

I think you get the basic idea behind it, it’s actually pretty clean and makes tests a lot more readable without looking at fixtures.

Note: At the time of this writing, the attribute name does not work since there is a conflict (that will be resolved soon). Instead you have to use:


Factory.define :project do |p|
  p.add_attribute :name, "myname" 
end

Mibbit Webchat - Online IRC client using Ajax

Everytime I was in need for a good online irc client (webchat), the only applications I found were either Java based, very limited or not even working.

I’m glad I found Mibbit recently, which is a feature rich online irc client using Ajax.

Some features of Mibbit (some are quite funny):

  • supports all major browsers
  • full UTF-8 support
  • multiple server and query connections
  • ‘recent chat’ feature when joining a channel
  • on the fly translation :)
  • smiley fu
  • SSL support
  • per-tab input history
  • integrated pastebin
  • image url thumbnails

You can even integrate it on your own website! Pretty cool..

So give it a try :)