Skip to content

Instantly share code, notes, and snippets.

function Airspace(lat, long) {
var url = "https://air.aloft.ai/airspace-api/airspace";
var key = "YOUR-KEY-GOES-HERE";
var payload = 'geometry={"type":"Point","coordinates":['+long+','+lat+']}';
var options = {
'method' : 'post',
'payload' : payload,
'headers': {'Authorization': 'Bearer '+ key}
};
var response = UrlFetchApp.fetch(url, options);
./src/index.js
Module not found: Can't resolve 'Root' in '/Users/username/kh/projectname/src'
@joshuaziering
joshuaziering / Fixed Wrapper
Created June 23, 2017 00:13
Using the right verb
<?php namespace Stanley\Geocodio;
use Stanley\Geocodio\Data;
use Guzzle\Http\Client as GC;
use Guzzle\Http\Message\Response;
class Client
{
const BASE_URL = 'https://api.geocod.io/v1/';
Analyzing dependencies
Pre-downloading: `SentrySwift` from `[email protected]:getsentry/sentry-swift.git`, tag `1.0.0`
[!] Error installing SentrySwift
[!] /usr/bin/git clone [email protected]:getsentry/sentry-swift.git /var/folders/45/xf9ndgwd5xs7wtx7s4dl1j5h0000gn/T/d20161207-8791-1ywow6x --template= --single-branch --depth 1 --branch 1.0.0
Cloning into '/var/folders/45/xf9ndgwd5xs7wtx7s4dl1j5h0000gn/T/d20161207-8791-1ywow6x'...
Permission denied (publickey).
fatal: Could not read from remote repository.
@joshuaziering
joshuaziering / ACOEmbed
Created July 8, 2013 17:24
Embed Code For ACO Infographic
<a href="http://carfinance.com/5-year-actual-cost-of-owning-a-vehicle-with-below-prime-auto-loans">
<img src="http://carfinance.com/wp-content/uploads/2013/07/Actual-Cost-Ownership.png">
Actual Cost Of Ownership With Financing</a>
@joshuaziering
joshuaziering / shopify-infusionsoft.php
Last active December 18, 2015 03:38
Webhook To Bring Email Addresses From Shopify To Infusionsoft
<?php
/**
* Webhook Handler For Shopify To Infusionsoft
*
* @author Joshua Ziering <[email protected]>
*/
// Include and instantiate Infusionsoft Libraries
include('isdk.php');
@joshuaziering
joshuaziering / gist:5718412
Created June 6, 2013 00:26
How to get the Shopify data into PHP
$customer_information = json_decode(file_get_contents('php://input'));
@joshuaziering
joshuaziering / shopify-infusionsoft
Last active February 28, 2017 05:54
A handler to take new customers from Shopify and put them into your Infusionsoft database.
<?php
/**
* Webhook Handler For Shopify To Infusionsoft
*
* @author Joshua Ziering <[email protected]>
*/
// Include and instantiate Infusionsoft Libraries
include('isdk.php');
@joshuaziering
joshuaziering / SalaryViz
Last active December 15, 2015 20:49
Shrinking Salary Visualization
<div><iframe style="border: 0px;" src="http://bl.ocks.org/ameliagreenhall/raw/d30a9ceb68f5b0fc903c/" height="600" width="600" scrolling="no"></iframe>
<center><a href="http://futureadvisor.com/401k">401k And Salary Analysis From FutureAdvisor</a></center>
<div>
[{"total_participants": 4400000.0, "average_plan_option_fee": 0.0249, "url": "https://futureadvisor.com/401k/thrift-savings-plan", "group_nm": 1, "balance_final": 859089.2618991669, "net_assets": 281000000000.0, "foregone_earnings": 1765.9056077526911, "parameterized_name": "thrift-savings-plan", "company_name": "Thrift Savings Plan", "timeseries": [{"balance": 5500.0, "time": 2013}, {"balance": 11389.074350499999, "time": 2014}, {"balance": 17688.024248297181, "time": 2015}, {"balance": 24418.646847399988, "time": 2016}, {"balance": 31603.780290112718, "time": 2017}, {"balance": 39267.350706372119, "time": 2018}, {"balance": 47434.421265533623, "time": 2019}, {"balance": 56131.24336835547, "time": 2020}, {"balance": 65385.31007062766, "time": 2021}, {"balance": 75225.411833746126, "time": 2022}, {"balance": 85681.694701546367, "time": 2023}, {"balance": 96785.72100689233, "time": 2024}, {"balance": 108570.53271587242, "time": 2025}, {"balance": 121070.71752199205, "time": 2026}, {"balance": 134322.4778074786