Uppercase in BASH

Geschrieben von Jens am 08. June 2009

  1. echo "foo" | tr '[:lower:]' '[:upper:]'

Reverse upper with lower to get lowercase.

RailsWayCon 2009 day 1 part 2

Geschrieben von Jens am 06. June 2009

RailsWayCon Keynote: Present and Future of Programming Languages Through a Ruby Lens

Ola Bini

Ola gives an awesome Keynote about his toughts on programming languages in general.
The talk was really great and he gives so much information in a short time that is hard to
cover everything in a blog entry. He made some assumtions which I will repeat here for you:

  • The jvm is great and will be there a long time. I totally agree to this. The jvm is a great pice of software engineering.
  • Don’t use the term “Scripting” language call it pragmatic languages. For Ola and probably a lot of people out there scripting language has a negative sound. I personaly don’t think so but he made a good point.
  • Natural Languages are not rational designed and not logical in a lot of cases. The Sapir Worph hypotesis (where bdd is based on) doesn’t matter for natural languages but it does in programming languages.
  • This points are important to Ola as language designer: communication, abstraction, expressiveness (remove everything whats not relevant to buisness logic), first class access (for example eval in ruby).
  • The language is more important than the tools. That’s a point I totally agree. Especially in the java world people talk all the time about tools and forget the essence what’s really important: Get the job done in a simple, kiss and dry way. A Simple soluten without any tool support is much better than a complex solution with great tool support.
  • For Ola in the future there will be more than less programming languages. So if you know just one programming language it might be a good idea to learn another one.



RailsWayCon Session: Ruby sittin on the Couch

Alexander Lang

Alex talk was about CouchDB. Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database accessible via a RESTful HTTP/JSON API.

So, why Couch DB?
Alex says:

  • RESTful HTTP Interface
  • Store/read JSON documents
  • provides map reduce
  • It Scales on a single node by optimistic locking
  • muliple nodes (master/master replication)

The english was a bit hard to understand in some parts of the presentation. And I missed some comparison between CouchDB and a relational db model.



RailsWayCon Session: What is good UI?

Steven Bristol

Steven demonstrated 5 revisions of less accounting to get an impression how the user interface of the app changed and improved over the time.

Steven gave some nice tips for making a good ui:

  • You don’t get it right the first time
  • Whats your app? Do that not more.
  • Write more code so your users don’t have to do so much.
  • Ask for feedback
  • Use your own applications
  • If it’s hard to code a webpage the ui is bad



RailsWayCon 2009 day 1 part 1

Geschrieben von Jens am 26. May 2009

After running late because of some trouble with the berlin railways. I’ve skipped the first RailsWayCon Session and attended to the Webinale Keynote Phänomen Web 2.0 with Ossi Urchs .

The Talk was about Web 2.0 Basics and how the web has and will change buisness. It was nothing really new for me and most of the croud but a great summery of web 2.0 in general.


RailsWayCon Session: Show the Frontend some Love: HAML and SASS

Speaker: Jan Krutisch

Jan gives a really nice talk about haml. Haml is a markup language that’s used to cleanly and simply describe the XHTML of any web document without the use of inline code.

Accourding to Jan this are the pros on haml:

  • no redundancy
  • generates html nice code
  • For css ids and classes syntax similar to css
  • Filters to use textile, markdown, …

An this are the cons:

  • It’s a Problem when you have to deal with designers
  • Debugging is be harder in some cases

The other part of the session was about SASS which means Syntactically Awesome StyleSheets. The language comes with haml but can also used for it’s own. It solves some problems with css. A weird thing with cascading style sheets is that they doesn’t support real cascading. Sass solves this problem and also adds constants, calculations and imports.


RailsWayCon Session: The Pleasure and Pain of Migrating to jRuby

Speaker: Steven Bristol

Steven gives an intersting talk about problems he run into when moving his application LessAccounting to jruby. He decided to move the jruby because he had to implement a third party api written in java. The first Problems he run into was that all compiling gems like ferret or file column doesn’t work in jruby. So he had to replace this parts in his applications with other solutins.

The biggest Problem he run into was the deployment of the application with glass fish. After get everything running he still has the problem that the deployment with glass fish is much slower than with mongrel before.

His recomendation if somebody run into the same problem is don’t move your whole app to jruby. Just build a small application which exposes a rest interface.


RailWayCon 2009

Geschrieben von Jens am 22. May 2009

The conference on Ruby, Rails and more. Auf nach Berlin:

Eintrittskarte RailsWayCon

Eine Minute zum Träumen… Teil2

Geschrieben von Jens am 02. April 2009

Der zweite Teil unserer Journizer Hintergrundbilder als Präsentation auf Slideshare:

Unter:
www.journizer.com/wallpapers

gibt es die Hintergrundbilder in verschiedenen Auflösungen.

Apt mit Super-Kuh-Kräften

Geschrieben von Jens am 11. March 2009

Man beachte die letzte Zeile folgender Ausgabe.

  1. root@debian:~# apt-get
  2. apt 0.6.46.4-0.1 für linux i386 kompiliert am Feb 26 2007 16:19:57
  3. Aufruf: apt-get [Optionen] Befehl
  4.         apt-get [Optionen] install|remove pkg1 [pkg2 …]
  5.         apt-get [Optionen] source pkg1 [pkg2 …]
  6.  
  7. apt-get ist ein einfaches Kommandozeilenwerkzeug zum Herunterladen
  8. und Installieren von Paketen. Die am häufigsten benutzten Befehle
  9. sind update und install.
  10.  
  11. Befehle:
  12.    update       - neue Liste von Paketen einlesen
  13.    upgrade      - eine Paketaktualisierung durchführen
  14.    install      - neue Pakete installieren (pkg ist libc6 und nicht libc6.deb)
  15.    remove       - Pakete entfernen
  16.    source       - Quellarchive herunterladen
  17.    build-dep    - die Build-Abhängigkeiten für Quellpakete konfigurieren
  18.    dist-upgrade - »Distribution upgrade«, siehe apt-get(8)
  19.    dselect-upgrade - der Auswahl aus »dselect« folgen
  20.    clean        - heruntergeladene Archive löschen
  21.    autoclean    - veraltete heruntergeladene Archive löschen
  22.    check        - überprüfen, dass es keine nicht erfüllten Abhängigkeiten gib
  23.  
  24. Optionen:
  25.   -h   dieser Hilfetext
  26.   -q   protokollierbare (logbare) Ausgabe - keine Fortschrittsanzeige
  27.   -qq  keine Ausgabe außer bei Fehlern
  28.   -d   nur herunterladen - Archive NICHT installieren oder entpacken
  29.   -s   nichts tun; nur eine Simulation der Vorgänge durchführen
  30.   -y   für alle Antworten »Ja« annehmen und nicht nachfragen
  31.   -f   versuchen fortzufahren, wenn die Integritätsüberprüfung fehlschlägt
  32.   -m   versuchen fortzufahren, wenn Archive nicht auffindbar sind
  33.   -u   auch eine Liste der aktualisierten Pakete mit anzeigen
  34.   -b   ein Quellpaket nach dem Herunterladen übersetzen
  35.   -V   ausführliche Versionsnummern anzeigen
  36.   -c=? Diese Konfigurationsdatei benutzen
  37.   -o=? Beliebige Konfigurationsoptionen setzen, z. B. -o dir::cache=/tmp
  38. Siehe auch die Handbuch-Seiten apt-get(8), sources.list(5) und apt.conf(5) für
  39. weitergehende Informationen und Optionen.
  40.                        Dieses APT hat Super-Kuh-Kräfte.

Und des Rätsels Lösung:

  1. root@debian:~# apt-get moo
  2.          (__)
  3.          (oo)
  4.    /——\/
  5.   / |    ||
  6.  *  /\—/\
  7.     ~~   ~~
  8. …."Have you mooed today?"

:-)

Remove blank lines with grep

Geschrieben von Jens am 23. February 2009

  1. grep -v ^$

HOWTO: Install a rails stack with ruby-enterprise and passenger on CentOS

Geschrieben von Jens am 22. February 2009

Preparations:
Install CentOS with Apache and Mysql.

1. Install ruby enterprise:

  1. wget http://rubyforge.org/frs/download.php/41040/ruby-enterprise-X.X.X-X.tar.gz
  2. tar xzvf ruby-enterprise-X.X.X-X.tar.gz
  3. ./ruby-enterprise-X.X.X-X/installer

2. Create some links:

  1. ln -fs /opt/ruby-enterprise-1.8.6-20080624 /opt/ruby-enterprise
  2. ln -fs /opt/ruby-enterprise/bin/gem /usr/bin/gem
  3. ln -fs /opt/ruby-enterprise/bin/irb /usr/bin/irb
  4. ln -fs /opt/ruby-enterprise/bin/rake /usr/bin/rake
  5. ln -fs /opt/ruby-enterprise/bin/rails /usr/bin/rails
  6. ln -fs /opt/ruby-enterprise/bin/ruby /usr/bin/ruby

3. gem install rails -v 2.X.X

Problems:
I’ve got problems with missing Mysql libraries. To fix this:

3.1 Install mysql-devel

  1. yum install mysql-devel

3.2 Install mysql-gem

  1. /opt/ruby-enterprise-1.8.6-20080624/bin/ruby /opt/ruby-enterprise-1.8.6-20080624/bin/gem install mysql — –with-mysql-include=/usr/include/mysql –with-mysql-lib=/usr/lib64/mysql

4. Passenger (mod_rails)

4.1 Install Passenger (mod_rails)

  1. gem install passenger

4.2 Passenger Apache Module

  1. passenger-install-apache2-module

5. ImageMagick

5.1 Install ImageMagick Libraries

  1. yum install ImageMagick-devel

5.2 Install rmagick via gems

  1. sudo gem install –no-rdoc –no-ri –no-update-sources rmagick -v 1.15.15

Problems:

Parameter –version doesn’t work.
Don’t use the parameter “–version”

Read more about this problem:
http://www.beanlogic.co.uk/2008/8/13/installing-a-specific-verison-of-rmagick

Missing msfonts

Installation of msfonts according to:
http://hi.baidu.com/rainchen/blog/item/089ef7364497de320a55a9a3.html

  1. wget http://www.osresources.com/files/centos-windows-fonts/msfonts.tbz
  2. mkdir /usr/share/fonts/default/TrueType
  3. tar xvjpf msfonts.tbz -C /usr/share/fonts/default/TrueType/

6. Config of apache and your rails app
For configuration of passenger follow the instructions there

Thats it!

VueScan auf Deutsch

Geschrieben von Jens am 15. January 2009

Ed Hamricks geniales Scanprogramm Viewscan gibt es jetzt auch auf Deutsch. Wer eine Vollversion gekauft hat für den ist das Update umsonst.

Vielen Dank für den guten Service Ed!

Merb wird in Rails 3 gemergt!

Geschrieben von Jens am 24. December 2008

Wow tolle Nachrichten zu Weihnachten. Merb wird in Rails 3 gemerged. Damit wird Rails modularer, schneller und bekommt eine stabilere API für Plugins. Frohe Weihnachten.

Weitere Infos:

http://weblog.rubyonrails.com/2008/12/23/merb-gets-merged-into-rails-3 

http://yehudakatz.com/2008/12/23/rails-and-merb-merge/