Date: Every Thursday, from Thursday, January 5, 2012 to no end date Time: 10:00 am, Central Standard Time (Chicago, GMT-06:00) Meeting Number: 336 439 792 Meeting Password: (This meeting does not require a password.)
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 'jenkins/war' | |
require Jenkins::War.classpath | |
class BuildWrapper < Java::HudsonTasks::BuildWrapper | |
end | |
class Environment < Java::HudsonTasks::BuildWrapper::Environment |
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
knife-ssh> source /usr/local/lib/rvm | |
knife-ssh> which rvm | |
ec2-50-17-15-60.compute-1.amazonaws.com /usr/local/bin/rvm | |
knife-ssh> rvm info | |
ec2-50-17-15-60.compute-1.amazonaws.com | |
ec2-50-17-15-60.compute-1.amazonaws.com system: | |
ec2-50-17-15-60.compute-1.amazonaws.com | |
ec2-50-17-15-60.compute-1.amazonaws.com system: | |
ec2-50-17-15-60.compute-1.amazonaws.com uname: "Linux domU-12-31-39-09-9A-32 2.6.35-24-virtual #42-Ubuntu SMP Thu Dec 2 05:01:52 UTC 2010 i686 GNU/Linux" | |
ec2-50-17-15-60.compute-1.amazonaws.com bash: "/bin/bash => GNU bash, version 4.1.5(1)-release (i686-pc-linux-gnu)" |
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 'v8' | |
cxt = V8::Context.new | |
cxt.eval <<-EOJ | |
var Dude = function(name) { | |
this.greet = function() { | |
return "My name is " + name; | |
} | |
}; |
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
package ruby; | |
import org.jruby.RubyClass; | |
import org.jruby.RubyObject; | |
import org.jruby.embed.ScriptingContainer; | |
public class ERBSpike { | |
public static void main(String[] args) { |
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 'erb' | |
class WriterBinding | |
attr_reader :_eoutvar | |
def initialize(writer, context) | |
@_eoutvar = OutputWriter.new(writer) | |
for k,v in context | |
self.instance_variable_set("@#{k}",v) |
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
Object.send(:define_method, :"I-am-a-funny-method") do | |
puts "I am sooo funny!" | |
end | |
Object.new.send(:"I-am-a-funny-method") |
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
#include "v8.h" | |
#include "stdio.h" | |
using namespace v8; | |
void PrintlnWeakReferenceCallback(Persistent<Value> value, void * parameters) { | |
printf("->invoking weak reference callback\n"); fflush(stdout); | |
value.Dispose(); | |
} | |
int main(int argc, char **args) { | |
Persistent<Context> cxt(Context::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
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
def style | |
css = "".tap do |css| | |
Cell::Rails.total_order.each do |cell| | |
css.concat "/* begin #{cell} */\n" | |
cell.assets("*.less") do |filename, content| | |
css.concat "#{Less::Engine.new(content).to_css}\n" | |
end |
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 'v8' | |
class Foo | |
def bar | |
"bar" | |
end | |
end | |
V8::Context.new do |cxt| | |
cxt['Foo'] = Foo |