Skip to content

Instantly share code, notes, and snippets.

View ouranos's full-sized avatar

Olivier Brisse ouranos

View GitHub Profile
@ouranos
ouranos / benchmark_results.rb
Last active May 30, 2017 05:11 — forked from havenwood/benchmark_results.rb
Benchmarking serialization speed of YAML, JSON, Marshal, and MessagePack in Ruby, JRuby, and Rubinius
# ruby 2.3.3p222
user system total real
YAML 31.860000 0.000000 31.860000 ( 31.886926)
JSON 1.370000 0.000000 1.370000 ( 1.374081)
Marshal 0.710000 0.000000 0.710000 ( 0.711384)
MessagePack 0.510000 0.000000 0.510000 ( 0.505674)
# jruby 9.1.7.0 (2.3.1)
user system total real
YAML 26.270000 0.040000 26.310000 ( 25.652204)
@ouranos
ouranos / chef_solo_bootstrap.sh
Created November 14, 2012 05:06 — forked from ryanb/chef_solo_bootstrap.sh
Bootstrap Chef Solo
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p327.tar.gz
tar -xvzf ruby-1.9.3-p327.tar.gz
cd ruby-1.9.3-p327/
./configure --prefix=/usr/local
make
make install
@ouranos
ouranos / form.js
Created February 13, 2012 22:49 — forked from n0nick/form.js
Javascript extension for client_side_validations to support Formtastic Bootstrap form builder (v2.0)
clientSideValidations.formBuilders["FormtasticBootstrap::FormBuilder"] = {
add: function (element, settings, message) {
if (element.data('valid') !== false) {
element.data('valid', false);
var $parent = element.closest('.controls');
$parent.parent().addClass('error');
$('<span/>').addClass('help-inline').text(message).appendTo($parent);
} else {
element.parent().find('span.help-inline').text(message);
}

Privacy Policy

Last revised on [DATE]

The Gist

[COMPANY] will collect certain non-personally identify information about you as you use our sites. We may use this data to better understand our users. We can also publish this data, but the data will be about a large group of users, not individuals.

We will also ask you to provide personal information, but you'll always be able to opt out. If you give us personal information, we won't do anything evil with it.

Terms of Service

Last revised on [DATE]

The Gist

[COMPANY] operates the [SERVICE] service, which we hope you use. If you use it, please use it responsibly. If you don't, we'll have to terminate your account.

For paid accounts, you'll be charged on a monthly basis. You can cancel anytime, but there are no refunds.

CmdUtils.CreateCommand(
{
name: "ruby",
takes: {"function": noun_arb_text},
icon: "http://ruby-doc.org/favicon.ico",
homepage: "http://jackndempsey.blogspot.com",
author: {name: "Jack Dempsey", email: "jack.dempsey@gmail.com"},
license: "MPL,GPL",
description: "Search ruby functions documentation",
help: "Select a ruby function",