This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rvm ree@showoff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var MyMath, myMath, sys, x; | |
sys = require('sys'); | |
MyMath = function() {}; | |
MyMath.prototype.square = function(x) { | |
return x * x; | |
}; | |
MyMath.prototype.cube = function(x) { | |
return this.square(x) * x; | |
}; | |
myMath = new MyMath(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sys = require 'sys' | |
#oo love: | |
class MyMath | |
square: (x) -> | |
x * x | |
cube: (x) -> | |
this.square(x) * x | |
#functional love: | |
printSquare = (number_to_process) -> | |
"square(#{number_to_process}) = #{myMath.square(number_to_process)}" #<- why does this work? myMath should be out of scope in here! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sys = require 'sys' | |
class MyMath | |
square: (x) -> | |
x * x | |
cube: (x) -> | |
this.square(x) * x | |
#let's get something rolling: | |
myMath = new MyMath | |
x = 3 | |
#mind the nice string processing: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hacking some lines to get into the ruby object allocation process... | |
# Enable the GC profiler: | |
GC::Profiler.enable | |
# If our test create too many objects forcing the GC to run, | |
# we can disable the GC to properly see the object allocation | |
# GC.disable | |
def count_string_allocations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%# | |
# search given tags... | |
%> | |
<% | |
require File.join(File.dirname(__FILE__), 'src', 'toto_decoration') | |
decorator = TotoDecoration.new | |
%> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.ixquick.com/do/metasearch.pl?&cat=web&query= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'digest/md5' | |
require 'csv' | |
require 'json' | |
require 'curb' | |
require 'pp' | |
data = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
# Chiliproject to Redmine converter | |
# ================================= | |
# | |
# This script takes an existing Chiliproject database and | |
# converts it to be compatible with Redmine (>= v2.3). The | |
# database is converted in such a way that it can be run multiple | |
# times against a production Chiliproject install without | |
# interfering with it's operation. This is done by duplicating |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# released to the public domain, sven@makingthingshappen.de 2014 | |
opkg update | |
opkg install nano | |
opkg install python-openssl | |
opkg install distribute #contains easy_install | |
opkg install python-curl | |
easy_install bottle | |
easy_install paste |