Skip to content

Instantly share code, notes, and snippets.

Brendan Stromberger bstro

Block or report user

Report or block bstro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View problem.tex
\documentclass{report}
\usepackage{amsmath}
\begin{document}
\[
\left\{
\begin{alignedat}{2}
&\left.\begin{aligned}
1+4+3\\ 1+3+4
\end{aligned} \right\} &= 5
\\
View index.ptree
◊; located in the root folder of my project, adjacent to template.html.p
#lang pollen
front/cover.poly.pm
front/author_note.poly.pm
body/1_understanding_the_names.poly.pm
body/2_understanding_the_lines.poly.pm
body/3_the_trigrams.poly.pm
body/4_growth_needs_decay.poly.pm
View my_question.poly.pm
#lang pollen
◊; I have a custom tagged called `digram`. I use it like this:
◊digram{◊(lesser-yin)}
◊; I use this to render these characters: ⚌ ⚍ ⚎ ⚏
◊; I will be using these all over my document, but in this specific
◊; case, I need to render them much like they appear above: in a row.
◊; Eventually I will be rendering to HTML, Latex, PDF, and JSON (if I can
◊; figure out how). But for now, I am just concerned with HTML. I started
View example.elm
module Data exposing (data)
data = { title = "Steppenwolf", author = "Hesse"
, pages = 237 }
View parser.elm
parseStep : List Int -> Parser (Step (List Int) (List Int))
parseStep acc =
oneOf
[ end |> map (\_ -> Done (List.reverse acc))
, chompWhile Char.isDigit
|> getChompedString
|> andThen
(\s ->
case String.toInt s of
Just n ->
View parse.elm
-- My goal here is to be able to parse a string like "678767".
-- However, this same parser needs to be able to handle a string like "18.1.2.4"
-- My strategy is this: I parse the input as an integer.
-- If the parser has reached the end of the string, tag the chomped value as XXXXXX (see Index type below)
-- If the parser instead reaches a `.`, continue and recursively capture every integer following a `.`
-- Tag the resulting Int and List Int with XX. (see Index type below)
-- Also, I'm not sure, but I think line 16 needs this type:
-- dotDigit : List String -> Parser.Parser (Step (List Int) (List Int))
View components.assessment-timeline-node.js
import Ember from 'ember';
import computedStyle from 'ember-computed-style';
export default Ember.Component.extend({
classNames: ['assessment-timeline-node'],
classNameBindings: ['type', 'proficiency'],
attributeBindings: ['style'],
style: computedStyle('percentageX'),
View components.assessment-timeline-node.js
import Ember from 'ember';
import computedStyle from 'ember-computed-style';
export default Ember.Component.extend({
classNameBindings: ['type', 'proficiency'],
classNames: ['assessment-timeline-node'],
attributeBindings: ['style'],
@bstro
bstro / README.md
Last active May 21, 2018
simple selector middleware devtool
View README.md

This is a simple pattern I follow that helps maintain an easily accessible graph of all derived data flowing through a Redux application, and expose that derived data (as well as the Redux state itself) to the global window object in the browser's console.

selectorMiddleware.js

computes selectors and sets the derived data on the window object, visible at window.selectors

stateMiddleware.js

simply exposes the redux state to the window object at window.state. nothing crazy here

configureStore.js

apply the two middlewares

View bug.re
open ApolloLinks;
open ApolloInMemoryCache;
type dataObject = {
.
"__typename": string,
"id": string,
"key": string
};
You can’t perform that action at this time.