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
op2str :: Op -> String | |
op2str Plus = " + " | |
op2str Minus = " - " | |
op2str Mul = " * " | |
op2str Div = " / " | |
op2str Pow = " ^ " | |
prettyShow :: (Show a, Num a) => SymbolicManip a -> String | |
prettyShow = fst . prettyShow' |
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
# Enable Webrat's Selenium mode if one or more scenarios is tagged @selenium | |
Webrat.configure do |config| | |
config.mode = :rails | |
ObjectSpace.each_object(Cucumber::Ast::Features) do |features| | |
config.mode = :selenium if features.tag_count('selenium').nonzero? | |
end | |
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
" Vim color file | |
" Maintainer: Roman Gonzalez <romanandnreg at gmail dot com> | |
" Last Change: 2009 Aug 11 | |
" Version: 0.0.1 | |
" Screenshot: http://img.skitch.com/20090811-ti4b27qbftjybmau32ruygjjwx.jpg | |
" URL: http://blog.romanandreg.com | |
" For now this will only work on gvim | |
set background=dark |
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
class RomanTestsController < ApplicationController | |
def index | |
render :action => 'index', :layout => false | |
end | |
def another | |
embed_action :controller => 'roman_embedded', | |
:action => 'index' | |
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
import java.util.*; | |
import java.security.*; | |
public class MyEnvironment { | |
public static void main (String[] args) { | |
Map<String, String> m = System.getenv(); | |
for(String k : m.keySet()) { | |
System.out.printf("%s = %s\n", k, m.get(k)); | |
} |
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
module GlobRegex | |
( | |
globToRegex, | |
matchesGlob | |
) | |
where | |
import Text.Regex.Posix ((=~)) | |
import Data.Char (toLower) | |
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 "ruby_openid_test_server" | |
class TestHelper < Test::Unit | |
include RubyOpenIdTestServer::ServerSpecHelper | |
# The identity on the rots server (must be the same as the one executing) | |
self.rots_config = YAML.load(<<-CONFIG | |
identity: john.doe | |
sreg: | |
nickname: jdoe |
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
this.suggestionFiller = this.fireEvent.delay(500, this, ['inputChanged', possibleSuggestions]); |
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
migration 8, :add_projects_users do | |
up do | |
create_table :projects_users do | |
column :user_id, Integer, :key => true | |
column :project_id, Integer, :key => true | |
end | |
end | |
down do |
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
mysql> describe projects_users; | |
+------------+---------+------+-----+---------+-------+ | |
| Field | Type | Null | Key | Default | Extra | | |
+------------+---------+------+-----+---------+-------+ | |
| user_id | int(11) | YES | | NULL | | | |
| project_id | int(11) | YES | | NULL | | | |
+------------+---------+------+-----+---------+-------+ |