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
English short name lower case | Alpha-2 code | Alpha-3 code | Numeric code | ISO 3166-2 | |
---|---|---|---|---|---|
Afghanistan | AF | AFG | 004 | ISO 3166-2:AF | |
Åland Islands | AX | ALA | 248 | ISO 3166-2:AX | |
Albania | AL | ALB | 008 | ISO 3166-2:AL | |
Algeria | DZ | DZA | 012 | ISO 3166-2:DZ | |
American Samoa | AS | ASM | 016 | ISO 3166-2:AS | |
Andorra | AD | AND | 020 | ISO 3166-2:AD | |
Angola | AO | AGO | 024 | ISO 3166-2:AO | |
Anguilla | AI | AIA | 660 | ISO 3166-2:AI | |
Antarctica | AQ | ATA | 010 | ISO 3166-2:AQ |
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
{ | |
"kinds": [ | |
{ | |
"option": "Lemons", | |
"value": "lemons" | |
}, | |
{ | |
"option": "Tomatoes", | |
"value": "tomatoes" | |
}, |
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 'spreadsheet' | |
require 'minitest/autorun' | |
class TestSpreadsheet < MiniTest::Test | |
def setup | |
@sheet = Spreadsheet.new([2,2], "Sheet") | |
end | |
def test_for_iniatialize | |
assert_equal(2, @sheet.rows) |
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 'multiplication-table' | |
require 'minitest/autorun' | |
class TestPrinter < MiniTest::Unit::TestCase | |
def test_for_create_table | |
table = create_mult_table(3) | |
assert_equal(3, table.size) | |
assert_equal(3, table[0].size) | |
assert_equal(9, table[2][2]) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# monkey patch String class | |
# source: http://drawingablank.me/blog/ruby-boolean-typecasting.html | |
class String | |
def to_bool | |
return true if self == true || self =~ (/^(true|t|yes|y|1)$/i) | |
return false if self == false || self.empty? || self =~ (/^(false|f|no|n|0)$/i) | |
raise ArgumentError.new("invalid value for Boolean: \"#{self}\"") | |
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
# Install Git needed for Git based gems | |
packages: | |
yum: | |
git: [] | |
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
------------------------------------------------------------------------------------------------------------------------------ | |
DESCRIPTION: | |
Notes for deploying TileStream on an AWS EC2 Ubuntu 12.04.2 Server for development. Includes workflow for creating | |
a local tile cache with TileMill, connecting to your Ubuntu EC2 server via SSH using Mac OSX Terminal, and uploading | |
your tiles (.mbtiles) to your TileStream server. | |
REFERENCES: | |
TileStream git repo: https://github.com/mapbox/tilestream | |
----------------------------------------------------------------------------------------------------------------------------- |
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 DS from 'ember-data'` | |
ArrayTransform = DS.Transform.extend | |
deserialize: (serialized) -> | |
if (Ember.typeOf(serialized) is "array") then serialized else [] | |
serialize: (deserialized) -> | |
type = Ember.typeOf(deserialized) | |
if type is "array" | |
deserialized |
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
credentials.yml |