Archive for the 'all' Category

Thu
20
May '10
Customize Chrome Omnibar
by Frank Spychalski filed under google

I love Chrome! But one thing drove me crazy: we have numerous internal web-apps running on different hosts. From Firefox was easy to get to these tools by just typing the toolname (not the FQDN) in the url bar. Chrome knows it better and assumes that I want to search for toolname. A moment later it asked me if I meant toolname/ and remebers this choice (at least it annoys me only once per tool).

Yesterday I I got an idea and tryed a snippet of javascript as a search engine and was happy to see that it worked as intended. A few minutes of javascript hacking later the omnibar behaved the way I like it:

  • multiple words are a search query
  • single words are URLs, even without the trailing slash, always!
  • fix broken http at the start of an URL (happens to me sometimes when I cut’n'paste)

This is the current version of my default search engine, feel free to criticize, I’m a JS noob:
javascript:query="%s"; if (query.search(/\s/) != -1) { window.location="http://www.google.com/search?q=" + query; } else { query = query.replace(/^h?t?t?p?:///, ""); window.location="http://"+query; }

Enjoy and let me know if you have other ideas on how to improve this!


Sun
28
Feb '10
Dear Garmin…
by Frank Spychalski filed under Rants, outdoor

Dear Garmin,

I don’t know if anyone told you that you build pretty good hardware but your firmware SUCKS! It’s Nearly March 2010 and your customers still have to fight with an embarrassing Y2010 bug in your code, the UI is horrible and getting anything on or off the device is a pain. I am the not-so-proud owner of an eTrex HCx but I can’t remember the last time I actually used it. Why? Because a Nexus One with My Tracks is way better than anything you have to offer. No need to jump through hoops to get tracks off the device, no proprietary drivers that work with one and a half operating systems and I carry it anyway…

Do you want me back as a customer?

Build the eTrex Android.

Specs:

  • rugged version of the Nexus One (same screen, processor, etc.)
  • replaceable batteries (with a tiny battery in the device to let me switch batteries without shutting it down)
  • better GPS antenna & chips
  • tiny solar panel on the back

If you or any other company would build a device like that, you could ask ANY price and I would buy it. So please build it. Please…


Wed
10
Feb '10
Buzz…
by Frank Spychalski filed under Work, google

This is mainly a test to see how adding this blog to my Buzz account works. Additionally I want to say how thrilled I am to finally buzz with people outside work ;-)


Wed
6
Jan '10
JRuby on appengine with Ubuntu
by Frank Spychalski filed under JRuby, Ruby, appengine

Overall the instructions on code.google.com are really good, so this is just a dump to remind me of the Ubuntu specific stuff I did on a pristine Ubuntu installation…


sudo apt-get install sun-java6-jdk
sudo apt-get install ruby-full rubygems

This installs only rubygems 1.3.1 but appengine needs 1.3.5.

ERROR: Error installing google-appengine:
bundler requires RubyGems version >= 1.3.5


sudo gem install rubygems-update
sudo /var/lib/gems/1.8/bin/update_rubygems
sudo gem install google-appengine

Et voilà! Ten minutes later I have a running hello world in the cloud ;-)


Thu
15
Oct '09
pgrep or pkill sometimes do not find process
by Frank Spychalski filed under Computer, Work

The usual problem: you want to kill a process.

$ ps aux | grep randomprocessname
psycho 20429 0.0 0.0 11824 1580 pts/7 S+ 12:00 0:00 /bin/bash ./randomprocessname
psycho 20528 0.0 0.0 4188 740 pts/17 R+ 12:00 0:00 grep randomprocessname
$ pkill -9 randomprocessname
WTF? Kill that sucker!
$ pkill -9 randomprocessname
No typo... Am I crazy?
$ pgrep randomprocessname
What's wrong?
$ pgrep randomprocessna
20429
$ pkill -9 randomprocessna

For some arcane reason pgrep/pkill matches only the first 15 characters.


Tue
4
Aug '09
Android scripting environment supports JRuby
by Frank Spychalski filed under Ruby, android

Quite some time has passed since the last time I wrote something on this blog, mostly because I did little non-work related worth mentioning.

But last week I helped Damon to finally support JRuby on his Android Scripting Environment (ASE).

  • Downloaded JRuby sources (jruby-1.2.0RC1) from http://www.jruby.org/download.
  • Patched the build.xml to not include doc/index.html from dynalang.jar otherwise dx will complain about an HTML page in the ruby-complete.jar.

    $ diff -r jruby-1.2.0RC1 jruby-1.2.0RC1.patched/
    Only in jruby-1.2.0RC1.patched/: build
    diff -r jruby-1.2.0RC1/build.xml jruby-1.2.0RC1.patched/build.xml
    42c42
    <
    ---
    >
    238c238,240
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
    268c270,272
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
    387c391,393
    <         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar"/>
    ---
    >         <zipfileset src="${build.lib.dir}/dynalang-0.3.jar">
    >           <exclude name="**/doc/index.html"/>
    >         </zipfileset>
  • Downloaded the JSON sources from http://rubyforge.org/frs/?group_id=953 and put them in lib/ruby/1.8/json/
  • Copied android.rb to lib/ruby/1.8/.
  • Built jar-complete (ant jar-complete) and added jruby-complete.jar to eclipse project.
  • Connected the bits and pieces in com.google.ase.interpreter.jruby

    But beware! The new ASE apk is HUGE (4.6M) and JRuby is fairly slow. But it works ;-)



Last week I added the 1gb data plan to my Simyo contract to use the SIM with my Christmas G1. I tried a few configurations I found online for simyo but they did not work for me. After some frustration I tried an eplus configuration and this one finally worked for me:


Name: does not matter
APN: internet.eplus.de
Proxy: <empty>
Port: <empty>
Username: eplus
Password: <empty>
Server: <empty>
MMSC: <empty>
MMS proxy: <empty>
MMC: 262
MNC: 03
APN type: <empty>

Update:

The recommended configuration is:


Name: does not matter
APN: internet.eplus.de
Proxy: <empty>
Port: <empty>
Username: simyo
Password: simyo
Server: <empty>
MMSC: <empty>
MMS proxy: <empty>
MMC: 262
MNC: 03
APN type: <empty>

After the initial success with the eplus configuration, I had some problems with it, too. But I guess these errors were internal eplus network hiccups because they were gone without me changing anything and now both configs work.


Thu
26
Feb '09
Tab + Firefox on OS X
by Frank Spychalski filed under Computer

A few days ago I finally upgraded my (== my employer’s) Macbook Pro from Tiger to Leopard. Everything worked flawless except for one crazy problem: I could not use to tab key the way I used to in forms. My usual routine of quickly entering username, tab, password, tab, hit return did not work anymore. I searched through the Firefox settings but couldn’t find the “Drive psycho crazy”-option.

But thanks to the omniscient internet I found a solution. At the bottom of the “Keyboard & Mouse” preferences page is a setting which allows you to navigate only between text boxes or between all controls. I don’t know who came up with the great idea that the default should be “text boxes and lists only”, but I guess the mighty Steve knows what he is doing.


Tue
24
Feb '09
First sighting of JRuby on Android
by Frank Spychalski filed under all

Last week I cross-compiled miniruby to Android (more details on that adventure later). I asked some time ago about JRuby on Android and it seems like Charles Nutter finally managed to run JRuby on Android.

# cat test.rb
require 'java'
import java.lang.System

class Ruboto
  def greet(who)
    puts "Hello, #{who}!"
  end
end

name = System.get_property('java.runtime.name')
Ruboto.new.greet(name)

# dalvikvm -classpath ruboto.jar org.jruby.Main -X-C test.rb
Hello, Android Runtime!

This leaves only one question: where can I get ruboto.jar to start playing around with it :-)


Sun
22
Feb '09
Code reviews work
by Frank Spychalski filed under articles, comments, google

Seems like nowadays I only write blog posts in response to other blog articles… But I hope this is better than not writing at all. Ted Neward asks if code reviews do actually work because evidence suggests, that the scientific review process does not. Read the rest of this entry »


Bad Behavior has blocked 545 access attempts in the last 7 days.