Skip to content

Instantly share code, notes, and snippets.

View trevorblades's full-sized avatar
🌵
#AlwaysLearning

Trevor Blades trevorblades

🌵
#AlwaysLearning
View GitHub Profile
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600" rel="stylesheet">
</head>
<body style="margin: 0">
<table cellpadding="0" cellspacing="0" width="600" style="font-family: 'Source Sans Pro', Helvetica, sans-serif; font-size: 15px; color: #191C23; margin: 0 auto;">
<tr>
<td style="background: #3F20BA; color: white; padding: 45px; padding-bottom: 36px; text-align: center;">
<img width="125" src="https://i.imgur.com/B68dwyf.png" alt="Apollo logo" />
<h2 style="font-weight: 300; margin: 0; margin-top: 25px; line-height: 1.3;">We're hosting the following events in May to help you get the most out of GraphQL and Apollo.</h2>
import React from 'react';
const posts = [
{
id: 1,
from: 'XminionsniperX',
time: '21:30',
title: 'Welcome',
post: 'Welcome to the new Website everyone'
}
export function getStreak(answers) {
let streak = 0;
for (const answer of answers) {
if (!answer.correct) {
break;
}
streak++;
}
@trevorblades
trevorblades / new.js
Created May 11, 2019 21:58
compareStrings refactor
import maxBy from 'lodash/maxBy';
import {remove as removeDiacritics} from 'diacritics';
function prepareString(string) {
return removeDiacritics(string.toLowerCase());
}
export function compareStrings(value, ...solutions) {
const results = solutions.map(solution => {
let matches = 0;
@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>
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>;
}
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 React, {Component} from 'react';
import PropTypes from 'prop-types';
export default class ReadMoreLess extends Component {
static propTypes = {
text: PropTypes.string.isRequired
};
state = {
expanded: false
language: node_js
node_js: 8
cache:
directories:
- node_modules
before_deploy:
- npm run build
deploy:
provider: s3
region: us-west-2
@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",