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
compiling callback-2.c | |
make[2]: Leaving directory '/home/michael/.rvm/src/ruby-2.1.1/ext/date' | |
make[2]: Entering directory '/home/michael/.rvm/src/ruby-2.1.1/ext/mathn/complex' | |
compiling complex.c | |
installing default complex libraries | |
linking shared-object mathn/complex.so | |
make[2]: Leaving directory '/home/michael/.rvm/src/ruby-2.1.1/ext/mathn/complex' | |
compiling callback-3.c | |
installing default parser libraries | |
linking shared-object json/ext/parser.so |
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
{-# LANGUAGE FlexibleContexts #-} | |
module Main (main) where | |
import Control.Monad.Reader | |
type Year = Int | |
-- a person record has a birth year | |
data Person = Person { birthYear :: Year } |
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
{-# LANGUAGE OverloadedStrings #-} | |
data GUIEvent = KeyDownEvent { key_down__ctrl :: !Bool | |
, key_down__shift :: !Bool | |
, key_down__code :: !Int } | |
| MouseEvent { mouse__x :: !Int | |
, mouse__y ::!Int } | |
deriving (Show) | |
instance FromJSON GUIEvent where | |
parseJSON = withObject "GUIObject" parseGUIEvent |
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
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
import Control.Applicative | |
import Data.Monoid | |
import Test.QuickCheck | |
data JoinList m a = Empty | |
| Single m a | |
| Append m (JoinList m a) (JoinList m a) |
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
function OOPShim() { | |
} | |
function proxyMethods(names) { | |
for (var i = 0; i < names.length; i++) { | |
var name = names[i]; | |
OOPShim.prototype[name] = function(a) { | |
var args = Array.prototype.slice.call(arguments, 0); | |
args.unshift(this.state); | |
return FunctionalAPI[name].apply(this, 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 'test_helper' | |
class CheckinProcessingTest < ActionController::IntegrationTest | |
context "a user filling out the checkin form" do | |
should "do his thing" do | |
visit '/' | |
#fill out the account form | |
select 'No', :from => 'account[prev_cust_claim]' | |
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
#!/usr/bin/env ruby | |
# | |
# A one file test to show ... | |
require 'rubygems' | |
require 'dm-core' | |
# setup the logger | |
DataMapper::Logger.new(STDOUT, :debug) |
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
#!/usr/bin/env ruby | |
require 'optparse' | |
require 'rest_client' | |
require 'open-uri' | |
CLIENT_LOGIN_URI = URI.parse('https://www.google.com/accounts/ClientLogin') | |
CLIENT_LOGIN_HEADERS = {'Content-type' => 'application/x-www-form-urlencoded'} | |
SERVICE = 'mail' | |
ACCOUNT_TYPE = 'GOOGLE' | |
SOURCE = 'myaname-myprogram-0.0.1' |
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
ORG $1000 | |
START: ; first instruction of program | |
green_t EQU 60 | |
yello_t EQU 5 | |
lights EQU $2000 | |
timer EQU $2001 | |
n_ymask EQU %100010 ; EW will be red when NS yellow | |
n_gmask EQU %100001 | |
e_ymask EQU %010100 | |
e_gmask EQU %001100 |
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 MyDir < Dir | |
class << self | |
def [](args) | |
super(args).collect {|entry| do_junk(entry)} | |
end | |
end | |
end | |
describe MyDir | |
before do |
OlderNewer