Connect the Samsung Galaxy S i9000 with Ubuntu and adb

I bought the Samsung Galaxy S GT-i9000. This is my first Smartphone and ... yeah ... I am developer.

The same evening I tried to connect the phone with my Ubuntu system to write a little App. And, guess right ... it didn't work.

Opera command line options to set the geometry of the window

I tried to open Opera (10.60, Linux) with the command line option geometry for setting the width and height of the toplevel window. (I wanted to make some screenshots with different window sizes.) It was a hell to get it running properly, but finally, I found a solution that works.

Reset the password of your mysql root login at Ubuntu

If you forgot your mysql root account, you can reset the password for the root user via command line.

First, stop the mysql service:

sudo /etc/init.d/mysql stop

Second, create a startup script that resets the root password. Store the following lines into a file named mysql-reset-root.txt

Map Taglist and NERDTree in .vimrc

The taglist and the NERDTree plugins are great extensions of the vim editor. To map these two plugins to specific buttons, you can use the following lines in your .vimrc file.


" Taglist
"
let Tlist_Enable_Fold_Column = 0
let Tlist_Compact_Format = 1
let Tlist_File_Fold_Auto_Close = 0
let Tlist_GainFocus_On_ToggleOpen = 1

map <F11> :TlistToggle<cr>

Check tables in your Rails application

If you want to check the schema or the content of your tables (e.g. in your Sqlite db) in your rails application, you can use the following rails command to start the rails console:

rails dbconsole

The following command shows the available instructions:

.help

If you want to see the available tables:

.tables

How to start a Java .jar file

Java .jar files are excellent, if you want to run your code on different operating systems. There are different ways to run a .jar file on a Windows or Unix system.

Step 1: Install the Java Runtime Environment (JRE)

First you must install the Java Runtime Environment (JRE). The JRE makes it possible to run your Java application on different operating systems.

Authentication solution 'devise' version 1.0.8 does not work with Rails 3

If you try to use the authentication solution devise with Rails 3, you have to upgrade the version to 1.1.

First, add the dependency to your local Gemfile:

gem 'devise', "1.1.rc2"

Second, download and install the new version of devise:

gem install devise --version=1.1.rc2