Skip to content

Instantly share code, notes, and snippets.

View trevorblades's full-sized avatar
🌵
#AlwaysLearning

Trevor Blades trevorblades

🌵
#AlwaysLearning
View GitHub Profile
@trevorblades
trevorblades / county-selector.js
Last active June 17, 2016 23:40
CountySelector component
var React = require('react');
var statesObj = {
'Arkansas': [
'County name',
'Another county'
],
'California': [
'Some hippy county',
'Weed growing county'
@trevorblades
trevorblades / get-current-tile-layer.js
Created August 22, 2017 18:15
getCurrentTileLayer example
const getCurrentTileLayer = year => L.tileLayer(`https://storage.googleapis.com/planet-bigspringsmap-tiles/${year}tiles/{z}/{x}/{y}.png`, {tms: true, attribution: ''});
getCurrentTileLayer(2007);
// L.tileLayer('https://storage.googleapis.com/planet-bigspringsmap-tiles/2007tiles/{z}/{x}/{y}.png', {tms: true, attribution: ''});
@trevorblades
trevorblades / scroll-animation.js
Created September 11, 2017 18:56
Scroll animation
-
-
-
-
-
-
-
-
-
-
@trevorblades
trevorblades / user-reducers.js
Created January 9, 2018 22:37
Different options for async or object-based reducers
const user = 'foo';
// option 1: actions first
const defaultState = {
loading: false,
error: null,
properties: user
};
@trevorblades
trevorblades / consoles.json
Last active September 25, 2018 18:27
Console prices and sales adjusted for inflation
{
"Nintendo": [
{
"name": "N64",
"year": 1996,
"price": 289,
"sales": 32.93
},
{
"name": "Gamecube",
language: node_js
node_js: 8
cache:
directories:
- node_modules
before_deploy:
- npm run build
deploy:
provider: s3
region: us-west-2
import React, {Component} from 'react';
import PropTypes from 'prop-types';
export default class ReadMoreLess extends Component {
static propTypes = {
text: PropTypes.string.isRequired
};
state = {
expanded: false
Contrivance overdone artificial unnecessary adjective
Talking point a misdirected argument that does not address the main component of someone else's counterpoint adjective
Machination a plot or scheme adjective
Meta self referential or self inception adjective
Case study a particular instance of something being used as reference for thesis and study adjective
Deficit the amount by which something is too small or a failing or deficiency in the brain adjective
Vowel a letter representing a vowel sound, such as: a i e o u adjective
Consonant the sound in speech of every other letter except vowels adjective
Syllable spaces between words adjective
Tertiary third in order or level adjective
import PropTypes from 'prop-types';
import React from 'react';
import {formatMoney} from '../utils/format';
import {withTheme} from '@material-ui/core/styles';
function Diff(props) {
if (!props.value) {
return <span>Even</span>;
}
@trevorblades
trevorblades / index.html
Created May 2, 2019 18:25
fornite app notes
<!--
use getUserStats as the form's submit handler
so that users can press "enter" in the text input
-->
<form onsubmit="getUserStats">
<input type="text" name="username">
<button type="submit">
</form>