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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Nothing</title> | |
</head> | |
<body> | |
<%= content_for :gritter do %> | |
<%= js add_gritter("This is a notice", :image => :success, |
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 "net/http" | |
require "uri" | |
require "json" | |
require "csv" | |
class TicketsImport | |
def initialize(options) | |
@uri = URI.parse("https://api.github.com/repos/#{options[:user]}/#{options[:repo]}/issues") | |
@http = Net::HTTP.new(@uri.host, @uri.port) | |
@http.use_ssl = true |
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
=begin | |
Given | |
1. An array of strings where "L" indicates land and "W" indicates water, | |
2. a coordinate marking a starting point in the middle of the ocean | |
The Challenge: | |
Find and mark the ocean in the map by changing appropriate W's to O's. | |
An ocean coordinate is defined to be any coordinate directly adjacent to any other ocean coordinate. |
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
=begin | |
Given | |
1. An array of strings where "L" indicates land and "W" indicates water, | |
2. a coordinate marking a starting point in the middle of the ocean | |
The Challenge: | |
Find and mark the ocean in the map by changing appropriate W's to O's. | |
An ocean coordinate is defined to be any coordinate directly adjacent to any other ocean coordinate. |
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 'set' | |
class Point | |
attr_accessor :name, :x, :y | |
class << self | |
def parse(str) | |
name, x, y = str.split(',') | |
new(name, x.to_i, y.to_i) | |
end |