Skip to content

Instantly share code, notes, and snippets.

View jasonferrier's full-sized avatar
👨‍💻

Jason Ferrier jasonferrier

👨‍💻
View GitHub Profile
@jasonferrier
jasonferrier / chrome-extension.js
Created December 9, 2015 20:53
Chrome Extension: base64 decode query string data
/**
* This is the beginnings of a Chrome Extension that will extend the Chrome Developer Tools Network panel using
* the webRequest and devTools APIs.
* This will be very useful for debugging the calls that the Mixpanel snippet makes out when you make
* Mixpanel API calls in your code
*/
function d64json(data){console.info(JSON.stringify(JSON.parse(atob(data)),null,2));}
/*
@jasonferrier
jasonferrier / uhaul-ridiculous.json
Created March 14, 2018 03:27
U-Haul JSON upload (1.75MB!)
This file has been truncated, but you can view the full file.
{
"InTownEntities": [],
"OneWayEntities": [
{
"AlternateDestinationsRateInfo": [],
"DestinationRoundTripRateInfo":
{
"IncludedExtraDays": 0,
"IncludedExtraMiles": 0,
"AllowedDays": 0,
The XR was good after I addressed the few issues - reinforcing the aluminum subframe with 1/8" aluminum welded onto the front; fixing the electrical issues by adding a larger capacity LiFePo4 battery along with a Baja Designs Squadron Pro headlight with Skene Designs dimmer. I ran the bike with a Giant Loop Great Basin bag and had room for everything I needed for an 8 day, 1800 mile trip with a small backpack on top of the Giant Loop.
The biggest things with the XR that made me sell and move onto the 690 were the following:
- Realizing that I wasn't going to take the bike through South America and need the simpleness of the XRR and ability to run terrible gas through the carb
- Upgrading / fixing small annoyances would have cost me about $3k+ (new wheels, stripping the bike down to replace all bearings, and other small things)
- I badly sprained my right ankle a few months into owning the XRR. Kick starting the bike on multi-day trips where I was starting the bike up half-dozen or more times per day real
@jasonferrier
jasonferrier / Multiselect.js
Created July 13, 2018 17:56
Reproduce syntax highlighting bug
/* Copied from JedWatson/react-select/master/examples/src/components/Multiselect.js on 2018-July-13 11:55:55 MDT */
import React from 'react';
import createClass from 'create-react-class';
import PropTypes from 'prop-types';
import Select from 'react-select';
const FLAVOURS = [
{ label: 'Chocolate', value: 'chocolate' },
{ label: 'Vanilla', value: 'vanilla' },
{ label: 'Strawberry', value: 'strawberry' },
Actually take the time to get educated on idiomatic React and best practices.
**Step Zero**
- [X] https://www.lullabot.com/articles/how-to-learn-react
- [X] https://www.lullabot.com/articles/why-choose-react
- [X] https://www.youtube.com/watch?v=0ZNIQOO2sfA
**Step One**
- [x] https://developer.mozilla.org/en-US/docs/Web/JavaScript/A_re-introduction_to_JavaScript
- [x] Quick Start - https://reactjs.org/docs/installation.html
@jasonferrier
jasonferrier / error
Created July 14, 2018 20:59
json 1.8.3 build error
Installing json 1.8.3 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /Users/jasonferrier/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
/Users/jasonferrier/.rvm/rubies/ruby-2.4.1/bin/ruby -r ./siteconf20180714-56946-1kwvjb6.rb extconf.rb
creating Makefile
current directory: /Users/jasonferrier/.rvm/gems/ruby-2.4.1/gems/json-1.8.3/ext/json/ext/generator
make "DESTDIR=" clean
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jasonferrier
jasonferrier / 20190821_campsite_boundingBox.geojson
Created August 21, 2019 20:49
2019-Aug-21: Campsite extents
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
#
# Requires:
# - gdal_sieve.py
# - ogr2ogr (GDAL)
# - topojson (node.js)
# Grab the relative directory for source file.
# SRC_DIR=`dirname $0`
{
"type" : "FeatureCollection",
"features" : [
{
"type" : "Feature",
"geometry" :
{
"type" : "Polygon",
"coordinates" :
[