Skip to content

Instantly share code, notes, and snippets.

Kyle Tolle kyletolle

Block or report user

Report or block kyletolle

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kyletolle
kyletolle / alias_method_matcher.rb
Last active Jan 19, 2016
RSpec alias_method matcher
View alias_method_matcher.rb
# 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?) }
@kyletolle
kyletolle / fulcrum_project_example.json
Last active Aug 29, 2015
Fulcrum Project JSON Example
View fulcrum_project_example.json
{
"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"
}
}
@kyletolle
kyletolle / actual_output.html
Last active Aug 29, 2015
Multiline hidden field value's string padded in HAML
View actual_output.html
<!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>
@kyletolle
kyletolle / index.html
Created Jan 15, 2015
Broken leaflet toolbar draw example with node_modules
View index.html
<!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>
@kyletolle
kyletolle / index.html
Created Jan 15, 2015
Leaflet toolbar drawing demo
View index.html
<!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>
@kyletolle
kyletolle / index.html
Last active Aug 29, 2015
Minimal Leaflet Page
View index.html
<!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>
@kyletolle
kyletolle / index.html
Last active Aug 29, 2015
Minimal HTML5 Page
View index.html
<!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>
@kyletolle
kyletolle / minimal_html5.html
Last active Aug 29, 2015
Minimal HTML5 Pages
View minimal_html5.html
<!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>
@kyletolle
kyletolle / changeset.json
Last active Aug 29, 2015
changeset.json
View changeset.json
{
"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",
@kyletolle
kyletolle / hash_modification.rb
Created Aug 12, 2014
Hash Modification Example
View hash_modification.rb
#
# 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 }
You can’t perform that action at this time.