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 / photo_upload_response.json
Last active Aug 29, 2015
Uploading a photo to Fulcrum from Python
View photo_upload_response.json
// This is the response from the call, reformatted for readability.
{
"photo": {
"access_key": "f37be52e-06d2-418a-916d-0e5874a0de29",
"created_at": "2014-03-10T20:54:26Z",
"created_by": "Kyle Tolle",
"created_by_id": "51efe7d6a93448fc300048d9",
"exif": {
"pixel_x_dimension": 1090,
View gist:9939366
RubyProf.start
# Code to profile...
result = RubyProf.stop
# Print a graph to an HTML file, sorted by time spend in children.
File.open('profile_output.html', 'w') do |file|
printer = RubyProf::GraphHtmlPrinter.new result
printer.print(file, sort_method: :children_time)
View fulcrum_example_record.json
{
"record": {
"altitude": null,
"assigned_to": null,
"assigned_to_id": null,
"client_created_at": "2014-04-09T12:24:36Z",
"client_updated_at": "2014-04-09T12:26:50Z",
"course": null,
"created_at": "2014-04-28T20:38:46Z",
"created_by": "Kyle Tolle",
View fulrum_form_example.json
{
"form": {
"auto_assign": false,
"bounding_box": [
48.8518638,
2.3130969889462,
48.8772149651485,
2.3516665
],
"created_at": "2014-04-21T21:29:01Z",
@kyletolle
kyletolle / fulcrum_projects_example.json
Last active Aug 29, 2015
Fulcrum Example Projects
View fulcrum_projects_example.json
{
"current_page": 1,
"per_page": 20000,
"projects": [
{
"created_at": "2014-05-07T19:17:42Z",
"description": "Data collected that is in the Denver, CO area.",
"id": "3bc943c3-6477-4010-a876-85fce6fdf11",
"name": "Denver",
"updated_at": "2014-05-07T19:17:42Z"
@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 }
@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 / 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 / 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 / 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>
You can’t perform that action at this time.