Joined June 2012
·
Profile 2015 2

Endel Dreyer

Software Engineer at Goodgame Studios
Software Engineer
Goodgame Studios
·
Hamburg, Germany
·
·
·

Posted to RSpec Turnip Formatter over 1 year ago

Good job!

Posted to Singleton Pattern on Coffeescript over 1 year ago

@SamirTalwar ok, share what you think it's right instead

Posted to vim color schemes over 1 year ago

I've blogged about my top 5 color schemes last year: http://bugfixer.endel.me/2012/09/04/5-favorite-color-schemes-for-programming/

All of them are dark. I can't use light colors. :(

Posted to ~~ is faster than Math.floor() over 1 year ago

I agree with @eskimoblood. There is no need to "optimize" this sort of thing. Like the old "single quote" vs "double quotes" on PHP. Your code just get worst. It just doesn't matter on production.

You should use PostgreSQL instead. :trollface:

I prefer avoiding the creation of the full array. Like this:

length = 8
(0..length).to_a.collect { (rand() * 25 + 65).to_i.chr }.join

It generates from A..Z, from ASCII char codes.

Also useful for "gitcommit" filetype.

Posted to parseInt() can be dangerous over 1 year ago

Here is some benchmarks of String to Number conversions using JavaScript: http://phrogz.net/JS/string_to_number.html

Posted to cross domain iframe communication over 1 year ago

Didn't know about it. It seems to be supported even for IE8+ http://caniuse.com/#feat=x-doc-messaging

There is also a gem from Ruby world called taps: https://github.com/ricardochimal/taps

Posted to Object-Hash Mapping for Redis over 1 year ago

I think the redis-objects project handle this problem in a more sane way. https://github.com/nateware/redis-objects/

Posted to Installing ruby 2.0.0 with RVM over 1 year ago

Nice, I've had to install this way: (maybe I have an old rvm version?)

rvm install ruby-2.0.0-preview1  --with-openssl-dir=$HOME/.rvm/usr --verify-downloads 1
Posted to 0.1 + 0.2 !== 0.3 WTF? over 1 year ago

That's really bad. :)
In JavaScript you can use Number#toFixed method, like that:

Number((0.1 + 0.2).toFixed(2)) === 0.3
# true
Posted to CommandT for vim over 1 year ago

@bendoerr Please take a look about my experience with CommandT on my blog: http://bugfixer.endel.me/2012/05/14/commandt-vs-ctrlp/

Posted to CommandT for vim over 1 year ago

I prefer ctrl-p, which is written in pure vimscript.

https://github.com/kien/ctrlp.vim

Posted to How to kill (a great many) processes over 1 year ago

With a bash function you can kill processes by name like this:

function killallp() {
  kill `ps -ef | grep $1 | grep -v grep | awk '{print $2}'`;
}
$ killallp resque
Achievements
720 Karma
29,683 Total ProTip Views
Interests & Skills