Skip to content

Instantly share code, notes, and snippets.

struct HelloWorld
{
void operator()() const
{
std::cout << "Hello, World!" << std::endl;
}
};
// ...
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing;
namespace Simplex
{
class Simplex
@JakubOboza
JakubOboza / gist:758456
Created December 29, 2010 11:51
Extlib Hooks example
require 'rubygems'
require 'extlib'
puts "Extlib Hooks Example"
class ManBearPig
include Extlib::Hook
def bear?
puts "Nope it isn't!"
time( ls -d **/* | xargs grep TODO | awk '{print $0 "\n" }' )
(; ls -d **/* | xargs grep TODO | awk '{print $0 "\n" }'; ) 0,01s user 0,01s system 102% cpu 0,019 total
time( ls -d **/* | xargs grep TODO | awk '{print $0 "\n" }' )
(; ls -d **/* | xargs grep TODO | awk '{print $0 "\n" }'; ) 0,01s user 0,01s system 102% cpu 0,019 total
time( find -P * | xargs grep TODO | awk '{print $0 "\n" }' )
(; find -P * | xargs grep TODO | awk '{print $0 "\n" }'; ) 0,00s user 0,01s system 88% cpu 0,017 total
time ( zargs **/* -- grep TODO | awk '{print $0 "\n" }' )
(; zargs **/* -- grep TODO | awk '{print $0 "\n" }'; ) 0,00s user 0,00s system 20% cpu 0,017 total
require 'rubygems'
require 'aasm'
# show me the caller name
module Wombatize
def method_name
caller[0][/`([^']*)'/, 1]
end
end
require 'rubygems'
require 'transitions'
# show me the caller name
module Wombatize
def method_name
caller[0][/`([^']*)'/, 1]
end
end
make_depressed
Willing to giveup manhood?
make_depressed
Willing to giveup manhood?
strictly_for_fun?
make_happy
make_depressed
willing_to_give_up_manhood?
make_depressed
willing_to_give_up_manhood?
gem "mongoid", "~> 2.0.0.rc.6"
gem "bson_ext", "~> 1.2"
group :test, :development do
gem "rspec-rails", "~> 2.4"
gem "jslint_on_rails"
end
group(:test) do