Skip to content

Instantly share code, notes, and snippets.

View jasonferrier's full-sized avatar
👨‍💻

Jason Ferrier jasonferrier

👨‍💻
View GitHub Profile
scenario tenure usage solar_adopter income avg_bills_level
Model_Run_A Renter Low Non-adopter Lowest 66.24501596149938
Model_Run_A Renter Low Non-adopter Moderate 71.56755904077203
Model_Run_A Renter Low Non-adopter Middle 74.03720690286845
Model_Run_A Renter Low Non-adopter High 76.26706497987249
Model_Run_A Renter Low PV Adopter Lowest
Model_Run_A Renter Low PV Adopter Moderate
Model_Run_A Renter Low PV Adopter Middle
Model_Run_A Renter Low PV Adopter High
Model_Run_A Renter Low All Lowest 66.24501596149938
@jasonferrier
jasonferrier / console.js
Created May 3, 2023 14:34
Show message in Browser Dev Tools Console when opened
/*
* Taken from Material UI documentation:
* https://github.com/mui/material-ui-docs/blob/af5e109990a26318c96dbff6f25759ba91f0e147/docs/pages/_app.js#L112
*
* The `%c` directive in the text output of the `log()` instance method applies CSS to the text AFTER the directive
* See documentation section "Styling console output" at the following link
* https://developer.mozilla.org/en-US/docs/Web/API/console#outputting_text_to_the_console
*/
if (typeof window !== 'undefined' && process.env.NODE_ENV === 'production') {
{
"type" : "FeatureCollection",
"features" : [
{
"type" : "Feature",
"geometry" :
{
"type" : "Polygon",
"coordinates" :
[
#!/bin/bash
#
# Requires:
# - gdal_sieve.py
# - ogr2ogr (GDAL)
# - topojson (node.js)
# Grab the relative directory for source file.
# SRC_DIR=`dirname $0`
@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.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
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 / 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' },
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