no-EVP
1> c(bench3).
{ok,bench3}
2> bench3:run().
encrypt: 65230 times/sec
decrypt: 67715 times/sec
ok
# coding: utf-8 | |
require "twitter" | |
def search(target) | |
result = [] | |
(1..100).each do |i| | |
result << Twitter.search(target, :page => i, :rpp => 100) rescue break | |
end | |
iemon(result.flatten.uniq.sort_by(&:created_at).map(&:attrs)) |
class Integer | |
def to_roman | |
raise if self <= 0 || self >= 4000 | |
a = ("%04d" % self).split(//).map(&:to_i).reverse | |
m = { 1 => 'I', 5 => 'V', 10 => 'X', 50 => 'L', 100 => 'C', 500 => 'D', 1000 => 'M' } | |
(0..3).inject("") do |s,i| | |
i = 3 - i | |
s += case a[i] |
class Array | |
def add_up | |
Hash.new(0).tap{|h| self.each{|v| h[v]+=1 } } | |
end | |
end |
require 'formula' | |
class Exenv < Formula | |
homepage 'https://github.com/mururu/exenv' | |
url 'https://github.com/mururu/exenv/tarball/v0.1.0' | |
sha1 '8254e6351c9c5614aaa79923b152671d3585a188' | |
def install | |
prefix.install Dir['*'] |
require 'formula' | |
class ElixirBuild < Formula | |
homepage 'https://github.com/mururu/elixir-build' | |
url 'https://github.com/mururu/elixir-build/tarball/v20121112' | |
sha1 '6d3ae172359e26ee94370ce309edad79c996ea78' | |
head 'https://github.com/mururu/elixir-build.git' | |
option "without-exenv", "Don't install as an exenv plugin" |
#!/bin/sh | |
curl -s https://status.github.com/api/messages.json | \ | |
ruby -rjson -rtime -e \ | |
'JSON.parse(STDIN.gets).each{|s|c = {"good"=>"\e[32m", "minor"=>"\e[33m"}[s["status"]] || "\e[31m"; puts %{#{Time.parse(s["created_on"]).localtime}: #{c}#{s["body"].gsub("\n", " ")}\e[0m}}' |
no-EVP
1> c(bench3).
{ok,bench3}
2> bench3:run().
encrypt: 65230 times/sec
decrypt: 67715 times/sec
ok
(define false #f) | |
(define true #t) | |
(define (p a) | |
(print a)) | |
(define (pb a) | |
(print a) | |
(print "")) |
(define false #f) | |
(define true #t) | |
(define (p a) | |
(print a)) | |
(define (pb a) | |
(print a) | |
(print "")) |