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
$ cat main.cpp | |
#include "environment.hpp" | |
#include <iostream> | |
using namespace rubinius; | |
int main(int argc, char** argv) { | |
Environment env(argc, argv); | |
env.setup_cpp_terminate(); |
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
$ cat main.cpp | |
#include "environment.hpp" | |
#include <iostream> | |
using namespace rubinius; | |
int main(int argc, char** argv) { | |
Environment env(argc, argv); | |
env.setup_cpp_terminate(); |
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
puts __FILE__ | |
def salad | |
"caesar" | |
end | |
foo | |
puts salad |
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
for(NSString* fam in [UIFont familyNames]) { | |
NSLog(@"%@", fam); | |
for (NSString* fon in [UIFont fontNamesForFamilyName:fam]) { | |
NSLog(@" %@", fon); | |
} | |
} |
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
x = async(1, 2, 3) | |
puts x | |
x = async(4, 5, 6) |
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
# ---------------------------------------------- | |
# CRITICAL CODE STUDIES: WEEK 2 LITERACIES | |
# | |
# David M. Berry Feb 2012 | |
# | |
# Based on the webpage: http://stunlaw.blogspot.com/2011/09/iteracy-reading-writing-and-running.html | |
# | |
# ITERACY.RB | |
# Programmed in Zajal - http://zajal.cc/ | |
# Many thanks to Ramsey Nasser |
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
def random_name | |
first = ["Billy", "Bob", "Tom", "Dick", "Harry"] | |
last = ["Smith", "Doe", "Gage", "Driscoll", "Nichols"] | |
return "#{first.sample} #{last.sample}" | |
end | |
n = random_name | |
draw do |
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
# ------------------------------------------------------ | |
# | |
# Shakespeare Insult Generator 2.1 | |
# | |
# The program generates a random Shakespearean insult. | |
# Based on the original Perl code by Stephen Ramsay | |
# | |
# Written by David M. Berry | |
# 09 February 2012 | |
# |
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
/** | |
* VM supplies rb_ctx and rb_obj definitions here | |
*/ | |
#include "vm_specific.h" | |
extern "C" { | |
/** | |
* Create a embedded ruby context | |
*/ |
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
$("body").load("/index.html div.eb-slides", function() { | |
$("img").removeAttr("width"); | |
$("img").removeAttr("height"); | |
$(".views-field-view-node").remove(); | |
}); |