Good job!
@SamirTalwar ok, share what you think it's right instead
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. :(
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.
Here is some benchmarks of String to Number conversions using JavaScript: http://phrogz.net/JS/string_to_number.html
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
I think the redis-objects project handle this problem in a more sane way. https://github.com/nateware/redis-objects/
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
That's really bad. :)
In JavaScript you can use Number#toFixed method, like that:
Number((0.1 + 0.2).toFixed(2)) === 0.3
# true
@bendoerr Please take a look about my experience with CommandT on my blog: http://bugfixer.endel.me/2012/05/14/commandt-vs-ctrlp/
I prefer ctrl-p, which is written in pure vimscript.
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
https://github.com/endel/lazy-assets ;)