Skip to content

Instantly share code, notes, and snippets.

View twobitlabs's full-sized avatar

Two Bit Labs twobitlabs

View GitHub Profile
{
"@context": [
"https://raw.githubusercontent.com/geojson/geojson-ld/master/contexts/geojson-base.jsonld",
{
"@vocab": "https://api.weather.gov/ontology#",
"bearing": {
"@type": "s:QuantitativeValue"
},
"city": "s:addressLocality",
"county": {
@twobitlabs
twobitlabs / gistjson
Created May 4, 2018 23:08
Command line script to capture json, pretty print it, and publish as a gist
#!/usr/bin/env bash
# Make sure you have the gist commandline tool installed.
# gem install gist
# or brew install gist
#
# Example usage: gistjson weather "https://api.weather.gov/points/37.7628,-122.4398"
# Creates https://gist.github.com/twobitlabs/b9aec0c1508d21b09dd98139a5ef3ff9
if [ -z "$1" ]
{
"result": {
"_links": [
{
"href": "http://mend-api-v3-staging.us-west-2.elasticbeanstalk.com/v3/exercises/305",
"rel": "self"
}
],
"enabled": true,
"id": 305,
{
"box_score_url": "http://www.espn.com/mlb/gamecast?gameId=380807121",
"country": 0,
"full_pbp": {
"by_period": {
"description": "By Inning",
"groupings": [
{
"collapsed": false,
"description": "1st Inning",
{
"user": {
"first_name": "Todd",
"id": "5e4c6d93-8884-4c57-870b-603be19d2b87",
"last_name": "Twobit",
"mentions": [
{
"comment_id": 148334,
"commenter": {
"first_name": "David",
{"result":[{"id":34,"name":"subscription_options","kind":"prompt","content":"We have 3 Mend plans: \n\nMonthly ($9.99/mo)\n\n3-Months ($7.99/mo, $23.99 charged every 3 months)\n\nYearly ($4.99/mo, $59.99 charged every 12 months)"},{"id":35,"name":"choose_subscription_option_eos","kind":"question","content":"So you can Mend for the cost of a latte a month! All plans renew automatically, but can be canceled at any time. Which plan is right for you?","answers":[{"id":-1,"rank":1,"content":"Monthly","name":"com.letsmend.monthly.1.dev"},{"id":-2,"rank":2,"content":"3-Months","name":"com.letsmend.monthly.3.dev"},{"id":-3,"rank":3,"content":"Yearly","name":"com.letsmend.monthly.12.dev"},{"id":42,"name":"skip_subscription","rank":3,"content":"Skip for now"}]}]}
{
"result": [
{
"content": "We have 3 Mend plans: \n\nMonthly ($9.99/mo)\n\n3-Months ($7.99/mo, $23.99 charged every 3 months)\n\nYearly ($4.99/mo, $59.99 charged every 12 months)",
"id": 34,
"kind": "prompt",
"name": "subscription_options"
},
{
"answers": [
#!/usr/bin/env ruby
path = "/tmp/images"
files = Dir["#{path}/*.png"]
base_files = []
for file in files do
if !file.include? "x.png"
base_files << file
end
end
{"result":{"id":204,"email":"sdfsdsdfs@sfdsfdsf.com","display_name":"Sdfsd","birthdate":"2019-02-06","gender":"female","milestones":"breakup","push_notifications":true,"email_notifications":true,"activities_count":0,"completed_trainings_count":0,"mixpanel_id":"v3-204","breakup_reasons":[{"id":1,"label":"Commitment"},{"id":2,"label":"Incompatible"},{"id":3,"label":"Infidelity"},{"id":4,"label":"No love"},{"id":5,"label":"Distance"},{"id":6,"label":"Not sure"}],"created_at":"2019-02-06T17:27:27.646-08:00","updated_at":"2019-02-06T17:32:07.992-08:00","subscriber":false,"serve_ads":false,"relationships":[{"id":205,"breakup_date":"2019-02-06","last_ex_contact":"2019-02-06","breakup_reason_id":6}]}}
{
"result": {
"activities_count": 0,
"birthdate": "2019-02-06",
"breakup_reasons": [
{
"id": 1,
"label": "Commitment"
},
{