This file contains hidden or 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 'json' | |
| require 'net/http' | |
| SEARCH_URL = "http://search.twitter.com/search.json" | |
| query = "?since_id=12957284923&q=%23fumullins" | |
| def say(text) | |
| system "say #{text}" | |
| end |
This file contains hidden or 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 'json' | |
| require 'net/http' | |
| SEARCH_URL = "http://search.twitter.com/search.json" | |
| query = "?since_id=12957284923&q=%23fumullins" | |
| def say(text) | |
| system "say \"#{text}\"" | |
| end |
This file contains hidden or 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
| #!/usr/bin/env ruby -w | |
| require 'rubygems' | |
| require 'rack' | |
| require 'rack/handler/webrick' | |
| require 'optparse' | |
| class App | |
| def self.root | |
| Dir.pwd |
This file contains hidden or 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 'autotest/fsevent' | |
| require 'autotest/growl' | |
| module Autotest::Emacs | |
| @@client_cmd = 'emacsclient -e' | |
| def self.command= o | |
| @@client_cmd = o | |
| end |
This file contains hidden or 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 hello { | |
| abstract class Sayer { | |
| def say(): String | |
| } | |
| object SayHello extends Sayer { | |
| def say = "Hello" | |
| } | |
| package object api { | |
| type Talker = Sayer |
This file contains hidden or 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
| Promise = | |
| value: () -> | |
| val = null | |
| return () -> | |
| val or= arguments[0] | |
| describe "Promise", -> | |
| it "only returns something when it's been assigned", -> | |
| x = Promise.value() | |
| expect(x()).toBeFalsy() |
This file contains hidden or 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
| bin/ | |
| !bin/*.config |
This file contains hidden or 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
| trait Tree[+A] { | |
| def insert[B >: A <% Ordered[B]](b: B): Tree[B] | |
| def contains[B >: A <% Ordered[B]](element: B): Boolean | |
| } | |
| case class Node[+A](value: A, left: Tree[A], right: Tree[A]) extends Tree[A] { | |
| def insert[B >: A <% Ordered[B]](b: B): Tree[B] = b.compare(value) match { | |
| case x if x < 0 => Node(value, left.insert(b), right) | |
| case 0 => this |
This file contains hidden or 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 eg | |
| import org.apache.avro._ | |
| import generic.{GenericDatumWriter} | |
| import reflect.{ReflectDatumWriter} | |
| import specific.{SpecificDatumWriter} | |
| import io.{BinaryEncoder, JsonEncoder} | |
| import java.io.ByteArrayOutputStream | |
| import java.lang.reflect.{Method => JMethod} |