A simple and concise (474 bytes minified, 1KB normal) binary clock in Shoes.
Compatible with Shoes 2 (Raisins) and 3 (Policeman).
Design inspired by The Game of Life on the ShoeBox.
Ceci est un essai de réponse en Ruby à: | |
http://lasts.goldzoneweb.info/pf.html |
require "benchmark" | |
require "thread" | |
require "thread/queue" | |
methods = { | |
push: -> q { N.times { |i| q.push i } }, | |
pop: -> q { N.times { |i| q.pop } }, | |
empty?: -> q { | |
(N/2).times { |i| q.empty? } | |
q.push :tmp |
_why the lucky stiff | |
his brain was rare in the world | |
hackety hack -- brilliant | |
_why the lucky stiff | |
we miss him even today | |
how very poignant | |
_why the lucky stiff | |
sometimes didn't make much sense |
#!/usr/bin/env ruby | |
=begin | |
INSTALL: | |
curl http://github.com/defunkt/gist/raw/master/gist.rb > gist && | |
chmod 755 gist && | |
sudo mv gist /usr/local/bin/gist |
#!/usr/bin/env ruby -wKU | |
### A parasitic class | |
class Parasite | |
### Make all future instances of the Parasite actually call | |
### methods of the +victim+ instead. | |
def self.infest( victim ) | |
victim.methods.each do |m| | |
meth = victim.method( m ) |
require "rubygems" | |
require "sinatra" | |
get "/next" do | |
tell_itunes "next track" | |
end | |
get "/previous" do | |
tell_itunes "previous track" | |
end |
A simple and concise (474 bytes minified, 1KB normal) binary clock in Shoes.
Compatible with Shoes 2 (Raisins) and 3 (Policeman).
Design inspired by The Game of Life on the ShoeBox.
A long, long time ago... | |
I can still remember | |
How his blog used to make me smile. | |
And I knew that if he had his chance | |
That he could make their code enhance | |
And, maybe, they’d be happy for a while. | |
But August made me shiver | |
With every code line I’d deliver. | |
Bad news on the doorstep; |
diff --git a/lib/compiler/ast/transforms.rb b/lib/compiler/ast/transforms.rb | |
index 19e1cfb..4e52ec2 100644 | |
--- a/lib/compiler/ast/transforms.rb | |
+++ b/lib/compiler/ast/transforms.rb | |
@@ -59,6 +59,71 @@ module Rubinius | |
end | |
end | |
+ # Provide an underscore node that allows partial application in Ruby. | |
+ # Instead of doing a method call, we are going to generate a lambda |
# GENERATE CERTIFICATES | |
require 'openssl' | |
class CertGenerator | |
def self.generate | |
CertGenerator.new.generate | |
end | |
def generate |