An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
An implementation of Conway's Game of Life in 140 characters of Ruby.
Created by Simon Ernst (@sier).
require 'fileutils' | |
class Server | |
#========================================================================== | |
VERSION = "1.0.0" | |
def self.run! | |
Server.new.run! | |
end |
#!/bin/bash | |
# | |
# Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS | |
# | |
# sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 & | |
# Go to ec2-user home directory | |
cd /home/ec2-user | |
# yum libraries |
regex = Regexp.new(/^[0-9]* (.*), (.*) [a-zA-Z]{2} [0-9]{5}(-[0-9]{4})?$/) | |
addresses = ["420 Fanboy Lane, Cupertino CA 12345"] | |
addresses << "1829 William Tell Oveture, by Gioachino Rossini 88421" | |
addresses << "114801 Western East Avenue Apt. B32, Funky Township CA 12345" | |
addresses << "1 Infinite Loop, Cupertino CA 12345-1234" | |
addresses << "420 time!" | |
addresses.each do |address| | |
print address | |
if address.match(regex) |
SPEC_STATS = {} | |
SPEC_STAT_ENABLED = 'true' == ENV['SPEC_STAT'] | |
RSpec.configure do |config| | |
config.before(:each) do | |
@__started = Time.now if SPEC_STAT_ENABLED | |
end | |
config.after(:each) do | |
if SPEC_STAT_ENABLED |
class Element | |
include Comparable | |
attr_accessor :name, :priority | |
def initialize(name, priority) | |
@name, @priority = name, priority | |
end | |
def <=>(other) |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
rails new MapFilters -T --database=postgresql |
rake db:create | |
rake db:migrate | |
rails server |
ogr2ogr -f "ESRI Shapefile" wgs84.shp shapes.shp -s_srs EPSG:27700 -t_srs EPSG:4326 |