Quote for 2013-12-03
XML is like violence - if it doesn’t solve your problems, you are not using enough of it. http://nokogiri.org/
XML is like violence - if it doesn’t solve your problems, you are not using enough of it. http://nokogiri.org/
This one is hard to find out there so here it is. If you have an uncommitted change (its only in your working copy) that you wish to revert (in SVN terms) to the copy in your latest commit, do the following: git checkout filename This will checkout the file from HEAD, overwriting your change. This command is also used to checkout branches, and you could happen to have a file with the same name as a branch. All is not lost, you will simply need to type: ...
I saw the best minds of my generation… writing spam filters. Neal Stephenson, Solve For X
The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, a thought, or a ship name in Western texts. http://html5doctor.com/i-b-em-strong-element/ This is news to me.
The gist pointed out that Hash.new, with its default values, is good for implementing Fibonacci sequences. So I decided to check: fib = Hash.new do |hash,key| k = key.to_i hash[key] = case k when 0 then 0 when 1 then 1 else hash[k-1] + hash[k-2] end end This recursive (and memoized!) definition means that you can do fib[18] and get back 2584, plus you get the Fibonacci numbers from F0 (fib[0]) to F17 (fib[17]). Recursively defined Hashes are useful auto-memoized structures. ...
Programming a drone is easy! Install Node.js and get the ar-drone module. All you need to do then is to execute the following code with node. That will make your drone take off, move around, do a flip and carefully land again. Seriously, that’s all! var arDrone = require(‘ar-drone’); var client = arDrone.createClient(); client.takeoff(); client .after(5000, function() { this.clockwise(0.5); }) .after(3000, function() { this.animate('flipLeft’, 15); }) .after(1000, function() { this.stop(); this.land(); }); ...
I love inject. To be more specific, I love Enumerable#inject. I find it easy to read and easy to use. It’s powerful and it lets me be more concise. Enumerable#inject is a good thing. Jay Fields’ Thoughts Facts. I’ve seen this thing in action before, but really started to scrape the surface today. It seems to be a good example of Ruby is about, namely making coding more friendly for people & allowing multiple ways of doing things.
When you don’t create things, you become defined by your tastes rather than ability. Your tastes only narrow and exclude people. so create. Why the Lucky Stiff, via Twitter, via Smashing Magazine
So: the technical reason we started counting arrays at zero is that in the mid-1960′s, you could shave a few cycles off of a program’s compilation time on an IBM 7094. The social reason is that we had to save every cycle we could, because if the job didn’t finish fast it might not finish at all and you never know when you’re getting bumped off the hardware because the President of IBM just called and fuck your thesis, it’s yacht-racing time. http://exple.tive.org/blarg/2013/10/22/citation-needed/ via Infovore
…Ruiu posited another theory that sounds like something from the screenplay of a post-apocalyptic movie: “badBIOS,” as Ruiu dubbed the malware, has the ability to use high-frequency transmissions passed between computer speakers and microphones to bridge airgaps. Ars Technica