This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| one colon vs two | |
| wrap, wrapper, inner, container | |
| ordering properties | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://codepen.io/spencerkingman/full/WOROqQ/ | |
| https://codepen.io/spencerkingman/full/MopGvp/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| CRA | |
| - comes with fetch | |
| - node-path | |
| -nmaes https://github.com/airbnb/javascript#naming--filename-matches-export | |
| * use core building blocks (<Button />, etc) | |
| * background: url(./niche-logo-stacked.svg); // Webpack finds al relative module refs and replaces them with final paths from compiled bundle | |
| * babel-present-env | |
| * breakpoint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| https://developers.google.com/speed/docs/insights/PrioritizeVisibleContent | |
| > Structure your page so the initial response from your server sends the data necessary to render the critical part | |
| of the page immediately and defer the rest. This may mean that you must split your CSS into two parts: | |
| - an inline part that is responsible for styling the ATF portion of the content, | |
| - and the part that can be deferred. | |
| Enter isomorphic-style-loader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // --- open questions -- | |
| // type systems? typescript, flow | |
| // ex: | |
| function add(left: number, right: number): number { | |
| return left + right; | |
| } | |
| // typescript: | |
| // - provides static typing through type annotations to enable type checking at compile time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // https://github.com/tc39/proposal-dynamic-import | |
| // http://2ality.com/2017/01/import-operator.html#loading-code-on-demand | |
| /** | |
| CURRENT STATE | |
| - top-level, not conditional, not able to be used in event handler, | |
| - not dynamic due, fixed module specifier (./dir/someModule) | |
| **/ | |
| import * as someModule from './dir/someModule.js' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| require "yaml" | |
| # Load our default config file, 'config/default.yaml' | |
| CONF = YAML.load(File.open("config/default.yaml", File::RDONLY).read) | |
| # Next, load local overrides from 'config/local.yaml' | |
| # If it doesn't exist, no worries. We'll just use the defaults |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* eslint-disable class-methods-use-this */ | |
| import React from 'react' | |
| import { connectToStores } from 'fluxible-addons-react' | |
| /** | |
| * In our unit test suite, it becomes really cumbersome to | |
| * test around the component wrapper that gets instantiated | |
| * through the `connectToStores` call. This method just lets | |
| * us avoid this wrapper for direct access to the component |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react' | |
| import { withDependencies } from '../utils/env-utils' | |
| import { isInBackpack } from '../utils/backpack-utils-utils' | |
| const BackpackTester = ({ thing }, { _ }) => ( | |
| const isThingInBackpack = _.isInBackpack(thing) | |
| return ( | |
| <div> | |
| Is thing in backpack? { isThingInBackpack } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| LOG="[pre-commit]" | |
| console=`grep -n console $(git diff --name-only --cached) -H --color` | |
| if [ -z "$console" ]; then | |
| tput setaf 2; echo "$LOG no \`console\` left in commit" | |
| tput sgr0 | |
| exit 0 |