Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name My Fancy New Userscript
// @namespace http://use.i.E.your.homepage/
// @version 0.1
// @description enter something useful
// @match http://localhost:8080/*
// @copyright 2012+, You
// ==/UserScript==
function onjQueryLoad(onloadCallback){
@verus
verus / easybook.rb
Created February 20, 2012 21:40
Easybook formula for homebrew
require 'formula'
class Easybook < Formula
head 'https://github.com/javiereguiluz/easybook.git', :branch => 'master'
url 'https://github.com/javiereguiluz/easybook/tarball/v4.0.0'
homepage 'http://easybook-project.org/'
md5 'b9f891d3a88f8dd4013aa243c8b0ccb1'
def install
prefix.install Dir['*']
@verus
verus / easybook.rb
Created February 20, 2012 20:39
Easybook formula for homebrew
require 'formula'
class Easybook < Formula
head 'https://github.com/javiereguiluz/easybook.git', :branch => 'master'
url 'https://github.com/javiereguiluz/easybook/tarball/v4.0.0'
homepage 'http://easybook-project.org/'
md5 'b9f891d3a88f8dd4013aa243c8b0ccb1'
def install
prefix.install Dir['*']
stra = (1..100000).map{ (1..100).map{ rand(255).chr }.join }
strb = (1..100000).map{ (1..100).map{ rand(255).chr }.join }
syma = stra.map{|e| e.to_sym }
symb = strb.map{|e| e.to_sym }
start = Time.now
puts syma == symb
puts Time.now - start
stra = (1..100000).map{ (1..100).map{ rand(255).chr }.join }
strb = (1..100000).map{ (1..100).map{ rand(255).chr }.join }
syma = stra.map{|e| e.to_sym }
symb = strb.map{|e| e.to_sym }
start = Time.now
puts stra == strb
puts Time.now - start
arya = (1..100000).map{ rand(1000) }
aryb = (1..100000).map{ rand(1000) }
stra = arya.map{|e| e.to_s }
strb = aryb.map{|e| e.to_s }
syma = stra.map{|e| e.to_sym}
symb = strb.map{|e| e.to_sym}
start = Time.now
def haar l
def aux l, m, n
if l.size == 1
l + n
elsif l.size == 0
aux m, [], n
elsif l.size > 1
aux l[2..-1] , [l[0] + l[1]] + m, [l[0] - l[1]] + n
else
[]
@verus
verus / wavelet.hs
Created February 1, 2012 08:40
Wavelet transform in Haskell
import System.Environment
haar:: [Int] -> [Int]
haar l = aux l [] []
where aux [s] [] d = s : d
aux [] s d = aux s [] d
aux (h1:h2:t) s d = aux t ((h1 + h2) : s) ((h1 - h2) : d)
aux _ _ _ = []
array = [2, -3]
require 'formula'
class Mimetex < Formula
url 'http://www.forkosh.com/mimetex.zip'
homepage 'http://www.forkosh.com/mimetex.html'
md5 '95400bb0f597760801a0841e7108f242'
version '1.72'
def install
name = "mimetex"
@verus
verus / bayon.rb
Created January 17, 2012 09:26
Bayon formula for homebrew
require 'formula'
class Bayon < Formula
url 'http://bayon.googlecode.com/files/bayon-0.1.0.tar.gz'
homepage 'http://bayon.googlecode.com/'
md5 '7270e483bdb1f7d58c3efbf695e2d427'
def install
system "./configure", "--prefix=#{prefix}"
system "make"