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
# | |
# Hashes can be modified by a method they're passed in to, which would affect | |
# what they contain. This could be an unexpected side-effect. | |
# $ ruby hash-modification.rb | |
# Hash before modification: | |
# {:a=>1, :b=>2} | |
# Hash after modification | |
# {:a=>1, :b=>2, :c=>3, :d=>4} | |
# | |
original_hash = { a: 1, b: 2 } |
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
{ | |
"changeset": { | |
"metadata": { | |
"application": "Fulcrum iOS", | |
"application_build": "1823", | |
"application_version": "2.3.3", | |
"device_identifier": "4EDA094F-DCC2-40C5-B71A-9FF22B831409", | |
"device_manufacturer": "Apple", | |
"device_model": "iPhone6,1", | |
"platform": "iOS", |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!-- For viewing the page on mobile devices --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Barebones HTML5</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="application.js"> | |
</head> |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!-- For viewing the page on mobile devices --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Barebones HTML5</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="application.js"></script> | |
</head> |
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> | |
<title>Minimal Leaflet Page</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<style> | |
html, body, #map { margin: 0; height: 100%; width: 100%; } | |
</style> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> |
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> | |
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" type="text/css" href="leaflet.draw.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="leaflet.toolbar.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
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> | |
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-draw/dist/leaflet.draw.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-toolbar/dist/Leaflet.Toolbar.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
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> | |
<title>HamlPlayground</title> | |
<link rel="stylesheet" media="all" href="/assets/scaffolds-07f6f551a374e3569370d2d26dba981d.css?body=1" data-turbolinks-track="true" /> | |
<link rel="stylesheet" media="all" href="/assets/testers-069e88c06b889877799890854d7f4c40.css?body=1" data-turbolinks-track="true" /> | |
<link rel="stylesheet" media="all" href="/assets/application-a6772d2c79915825e0baf618a303d51b.css?body=1" data-turbolinks-track="true" /> | |
<script src="/assets/jquery-eb3e278249152b5b5d5170b73d9dbf52.js?body=1" data-turbolinks-track="true"></script> | |
<script src="/assets/jquery_ujs-0b8f09cf5aec4ba1be1abd9f915c77e2.js?body=1" data-turbolinks-track="true"></script> | |
<script src="/assets/turbolinks-924184401b7d116eadaaefc96895fa84.js?body=1" data-turbolinks-track="true"></script> |
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
{ | |
"project": { | |
"name": "Denver", | |
"description": "Data collected that is in the Denver, CO area.", | |
"id": "3bc943c3-6477-4010-a876-8e5fce61fdf1", | |
"created_at": "2014-05-07T19:17:42Z", | |
"updated_at": "2014-05-07T19:17:42Z" | |
} | |
} |
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
# spec/support/matchers/alias_method_matcher.rb | |
# RSpec matcher for alias_method. | |
# Orignal idea borrowed from: https://gist.github.com/1950961 | |
# Usage: | |
# | |
# describe Boomerang do | |
# let(:boomerang) { described_class.new } | |
# let(:subject} { boomerang } | |
# it { is_expected.to alias_method(:in_flight?).to(:in_air?) } |