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
<wms-config> | |
<server> | |
<auto-discovery run="true" period="0"/> | |
<datafilestore> | |
<config-file>wms.DataFileStore.xml</config-file> | |
</datafilestore> |
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 trans_lat(lat) | |
lat =~ /([0-9]+)([NS])/ | |
num, dir = $1.to_i, $2 | |
dir == 'S' ? -num : num | |
end | |
def trans_long(long) | |
long =~ /([0-9]+)([EW])/ |
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
// this is set to validation/helpers | |
(function (ex) { | |
var knownTypes = [ | |
'event', | |
'profile', | |
'source_resolution', | |
'video' | |
]; | |
ex.isKnownType = function (type) { |
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
Contact: | |
comments: contact_comment | |
contact_date: contact_date_date | |
contact_id: contact_id | |
disposition: contact_disposition | |
distance_traveled: contact_distance | |
end_time: contact_end_time | |
interpreter: contact_interpret_code | |
interpreter_other: contact_interpret_other | |
language: contact_language_code |
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 'celluloid/io' | |
class EchoServer | |
include Celluloid::IO | |
def initialize(host, port) | |
@server = TCPServer.new(host, port) | |
run! | |
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
class Array | |
def extract_options! | |
last.is_a?(::Hash) ? pop : {} | |
end | |
def tail | |
head, *tail = *self | |
tail | |
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
{ 0 => ->{ "foobar" } } |
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
root PUT|POST / front_page#update | |
root / front_page#show | |
edit /edit(.:format) front_page#edit | |
login GET /login(.:format) sessions#login | |
POST /login(.:format) sessions#create | |
logout /logout(.:format) sessions#destroy | |
videos GET /videos(.:format) videos#index | |
POST /videos(.:format) videos#create | |
new_video GET /videos/new(.:format) videos#new | |
edit_video GET /videos/:id/edit(.:format) videos#edit |
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 'catalog/model' | |
module Catalog::Model | |
## | |
# Defines a schema for a model object. | |
# | |
# Schemas look like this: | |
# | |
# class Video | |
# include Catalog::Model |
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
The problem: | |
I want to be able to have attribute readers for a CouchDB document. Why? So I | |
can use Action Pack's form builder with said document. | |
Here's an example document: | |
{ "title": "A video", | |
"audio": [ | |
{ "artist": "Dot Dot Dot", |