June 2011
1 post
RT @tux2323: added a pure #ruby version, too. 5 times faster than csv lib, doesn’t handle special cases (separator chars within fields).
May 2011
3 posts
RT @kasparschiess: Rubinius should so not be written in C++… http://t.co/MCWdpnA #rubinius
RT @langalex: “congrats to the @euruko team for [..] the 1st conference t-shirt I can wear outside my bedroom.” That was last year’s IMHO.
travelling to Berlin for @euruko tomorrow. Any Rubyists meeting tomorrow afternoon (before pre conference meetup @ c-base)? @co_up perhaps?
April 2011
10 posts
Streamline your git workflow with aliases: http://robots.thoughtbot.com/post/4747482956/streamline-your-git-workflow-with-aliases
Bugs that only occur on Sundays are somewhat mean.
RT @lorentzforce: “The best minds of my generation are thinking about how to make people click ads,” he says. “That sucks.” http://buswk …
RT @hotdogsladies: SEO: An industry based on yelling “NEW JERSEY!”—then hoping someone mistakes you for Bruce Springsteen. For a second.
just released v 0.0.5 of em_mysql2_connection_pool. now featuring global errbacks. give it a try.
RT @chuyeow: Woah Nginx 1.0.0 released: http://nginx.org/
#pow .pow/local.dev/config.ru: run proc{ |env| [200, {}, `ls ..`.split(“\n”).map!{|a| %Q{<a href=”http://#{a}.dev”>#{a}.dev</a><br>} }] }
RT @JurgenLACoach: CFO asks CEO “What happens if we invest in developing our people & then they leave us?” CEO: ‘What happens if we don …
Just learnt how to use #RVM in #cronjobs: http://blog.scoutapp.com/articles/2010/09/07/rvm-and-cron-in-production
RT @hanke: Can you tell me why you used #search #engine X in your last project? New blog post: http://bit.ly/gxu5fs
March 2011
11 posts
RT @ripienaar: The Little MongoDB Book available on GitHub http://bit.ly/fYbvCU
/me likes https://github.com/defunkt/dotjs
RT @kasparschiess: githubbers: Since when is collecting forks and old projects a virtue? #springclean #github #now !
RT @iain_nl: GC Tune Ruby 1.9.2 With RVM @MetaSkills.net: http://disq.us/1eujv3 (@metaskills)
RT @wyattdanger: An interesting way to deploy a static site through Heroku and Dropbox http://t.co/74BupTj
#tinyite is featured on #ruby5: http://goo.gl/GJPzf YeaH!
#streaming 1450 128kbit/s #webradio station from a single 120MB #ruby process right now. #eventmachine rocks!
can’t isolate this damn bug… doing a manual git bisect now. doh. :(
TinySite static site engine released
Recently I tweeted a lot about my new pet project TinySite.
It’s basic concept is the content of a static site being driven by textile documents, hosted at Dropbox. That way you can update your site by just editing “local” files in your Dropbox folder. The document format supports multiple page parts so you can easily fill say a body and a sidebar into your layout. Global page...
TinySite is self-hosting (at least its docu FWIW ;) http://tinysite.heroku.com/
RT @euruko: First 50 tickets were sold within seconds. We try to improve the purchasing situation next time. Sorry about that.
February 2011
3 posts
And we laughed, because #PHP can’t have #2.2250738585072012e-308. Turns out, #Java doesn’t like it, too: http://bit.ly/fsOxtd
#chrome #fail: http://perso.hirlimann.net/~ludo/blog/archives/2008/09/chrome-and-404s.html aka make your 404 513 bytes
3 steps away from #safari: 3rd party pw-manage (i use 1password). 3rd party rss reader (i use socialite). try #chrome. not sure, yet.
January 2011
3 posts
#dropthesoap @kasparschiess http://bit.ly/fKd4CE Not SOAPs fault. MS will find a way to make devs build 3 classes to see REST responses, too
RT @mikbre: “killing two birds with one stone” should be replaced with something more relevant to modern times like “killing two pigs wi …
testdriving console_tweet https://github.com/seejohnrun/console_tweet
November 2010
1 post
Ruby monkey patches with unbound methods (instead...
When monkey-patching a method you usually wrap the original method call with another method, adding some functionality and then call the original method from the wrapper method. The common way of doing this is aliasing the original method and then overriding it:
or ActiveSupports famous #alias_method_chain seen everywhere in Rails.
Another possibility of preserving the original method is...
September 2010
2 posts
RT @samykamkar: evercookie - extremely persistent cookies using HTTP cookies, HTML5 storage, PNG caching, Flash LSOs & more http://samy. …
SQL ORDER BY rand() musings
Selecting a number of random entries from an SQL table is not as trivial as it seems at first. The obvious solution has one big problem:
SELECT * FROM my_table ORDER BY rand() LIMIT 5;
What the SQL server does is copying the whole table into a new temporary table, ordered by rand() and the selecting the first 5 entries. Depending on the table your selecting from this may not be, what you want....
July 2010
1 post
RT @kovyrin: “Java is a DSL for converting large XML files into Stack Traces” (via @labria)
May 2010
2 posts
get the friggin awesome #view_models here: http://github.com/floere/view_models #euruko
April 2010
5 posts
Distance function in MySQL
DELIMITER $$
DROP FUNCTION IF EXISTS `GetDistance`$$
CREATE FUNCTION `GetDistance`(lat1 DOUBLE, lon1 DOUBLE, lat2 DOUBLE, lon2 DOUBLE)
RETURNS DOUBLE
DETERMINISTIC
BEGIN
DECLARE distance DOUBLE;
SELECT (
(
ACOS(
SIN(lat1 * PI() / 180) * SIN(lat2 * PI() / 180)
+ COS(lat1 * PI() / 180) * COS(lat2 * PI() / 180) * COS((lon1 - lon2) * PI() / 180)
)...
DrX FTW!
Inspired by http://www.rubyinside.com/drx-visually-inspect-ruby-objects-3233.html I tried to install ruby with tcl/tk 8.5 in leopard for quite some time (note to myself: RTFM! Twice!) and finally got there:
Read this: http://www.tkdocs.com/tutorial/install.html
(Re-)Install ruby in rvm like
rvm install 1.8.7 -C --with-tcltk-framework=/Library/Frameworks,--enable-pthread,--enable-shared
Get...
my vimconf on github: http://github.com/niko/vimrc
hey filter EAT, DRINK and MUSIC
Watching a twitter stream filter for EAT, DRINK and MUSIC, MUSIC MUSIC flowing by…
March 2010
5 posts
just hit level 2 on thesixtyone! - http://www.thesixtyone.com/ende/
listening to Section 03 - Bigger Man by AMR - http://www.thesixtyone.com/s/y4xaRp3RMVk/
just unlocked level 1 of the listen up achievement - http://www.thesixtyone.com/listener/ende/achievements/
Minimum LOC: 288k in 0 lines of code
Programmers striving for minimum LOC will eventually end up with code as readable as this:
var...
February 2010
2 posts
ActiveRecord vs. Tokyo Cabinet vs. MongoDB
UPDATE: Just added numbers for 1_000_000 inserts and 100_000 selects on these.
Super simple song-records like this:
#<Song id: 1, artist: "Miss Daniela Corwin", title: "Wont Go Quietly",
blues: false, rock: true, country: false, dance: false, disco: false,
funk: false, grunge: false, hip_hop: true, jazz: false, metal: false,
pop: false, r_and_b: false>
The restricted genre columns are...
January 2010
3 posts
Taking Back Control
(what would I ever do without it?)