Skip to content

Instantly share code, notes, and snippets.

View alexkrolick's full-sized avatar
🏔️
I may be slow to respond.

Alex Krolick alexkrolick

🏔️
I may be slow to respond.
View GitHub Profile
@alexkrolick
alexkrolick / redux-docs-wtf.md
Last active February 3, 2020 03:43
redux-docs-wtf.md
  • Search "redux js"

    • Go to redux.js.org
    • "I know I should be using that toolkit thing, where is that?"
      • it's at the bottom of the navigation tree, ok, open that in a new tab
    • "What's the current package name for react-redux? Is it namespaced too now?"... how do I find that... googles it instead of looking in docs, now I am on a different docs site that looks kinda the same. Package name is under "getting started" > "install".
  • Going back to redux toolkit > click API

    • A friendly abstraction over the standard Redux createStore function that adds good defaults to the store setup for a better development experience.

      • lots of adjectives here but I don't know what about the defaults are good, better, or friendlier
  • API signatures are Typescript I guess? Kind of hard to wrap my head around them without code samples... where are those? Also these are the infamous single-letter generics, guessing "S" is state and "A" is action.

@alexkrolick
alexkrolick / testing-links.md
Last active December 10, 2018 02:26
Testing links
// this is a very naive parser that only works on simple tables
// - no nesting
// - no cells that contain \t (tab) characters
// Usage:
// tsv`
// "Name" \t "Price"
// "Apple" \t 2.50
// `
function tsv(strings, ...expressions) {

Meeting Design

Notes on the book "Meeting Design" by Kevin Hoffman, ISBN: 1-933820-38-1

Memory

  • Meeting length interferes with memory storage
  • Divide into 20-30 min activities. Provide cognitive slack time to turn short term into medium term memories.
  • ✘ don't serve simple sugar and carbs if providing food, serve healthy fats and proteins like nuts and cheese
  • Use visuals and "manipulatives" (tactile objects like sticky notes) to engage different forms of memory
@alexkrolick
alexkrolick / sass-variable-parser.js
Created June 23, 2018 21:23
Parse variables in a SASS file into an ES module
const fs = require("fs");
const byline = require("byline");
const camelCase = require('lodash.camelcase')
const inputFile = "./colors.scss";
const outputFile = "./colors.js";
const sassVarDeclaration = /^\$(.*)\:\s(\S*)(?:\s\!default\;|\;)$/;
const isReference = val => val.startsWith("$");
const getReferenceName = val => val.slice(1);
@alexkrolick
alexkrolick / keybindings.json
Created May 1, 2018 00:09
VSCode Keybindings
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "cmd+down",
"command": "editor.action.smartSelect.shrink",
"when": "editorTextFocus"
},
{
"key": "cmd+up",
"command": "editor.action.smartSelect.grow",
@alexkrolick
alexkrolick / Recommended-React-Libraries.md
Last active January 3, 2019 21:34
React Recommendations
@alexkrolick
alexkrolick / extensions.json
Created March 9, 2018 20:42
VSCode Extensions
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// General
"dbaeumer.vscode-eslint",
"christian-kohler.path-intellisense",
"christian-kohler.npm-intellisense",
"jakob101.RelativePath",
@alexkrolick
alexkrolick / knex-mock.js
Last active February 23, 2018 06:00
Knex.js Mock
import _ from 'lodash'
// In-memory Knex mock 🤯
function DB () {
const db = function (table) {
if (!table) return db
db._table = table
if (!db._db[table]) {
db._db[table] = {
_latestId: 0,