- Checked
- Unchecked
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
| 'atom-text-editor': | |
| 'cmd-;': 'editor:fold-current-row' | |
| 'cmd-\'': 'tabs:close-other-tabs' |
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'; | |
| /* | |
| Simple component that will not render anything. | |
| On mount it will bind to a document event, and it will clean up on unmount | |
| <DocumentEvent | |
| name="scroll" | |
| handler={updateScrollPosition} | |
| /> | |
| */ |
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, { Component } from 'react'; | |
| import { isEqual, debounce } from 'lodash'; | |
| import yaml from 'js-yaml'; | |
| import Measure from 'react-measure'; | |
| import styled from 'styled-components'; | |
| import uuid from 'uuid/v1'; | |
| import md5 from 'md5'; | |
| import { Transformation2DMatrix } from './TransformationMatrix.js'; | |
| import { DocumentEvent, Absolute, Whitespace, Layer } from './Elements.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
| import React from 'react'; | |
| import immutagen from 'immutagen'; | |
| export let generator_render = (generator_fn) => { | |
| let { Provider, Consumer } = React.createContext(); | |
| let render_subchild = (generator, value) => { | |
| let { value: element, next: next_generator } = generator(value); | |
| return <Provider value={{ generator: next_generator }}>{element}</Provider>; | |
| }; |
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'; | |
| export class Form extends React.Component { | |
| state = { | |
| has_submitted: false, | |
| submit_error: null, | |
| }; | |
| render() { | |
| let { children, onSubmit, conditions } = this.props; |
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
| // @flow | |
| let { uniq, flatten } = require('lodash'); | |
| let chalk = require('chalk'); | |
| let dedent = require('dedent'); | |
| let { isEqual, padStart, padEnd, trimEnd } = require('lodash'); | |
| let fs = require('fs'); | |
| // NOTE CLASSIC | |
| const indent = indentLevel => (...args) => { |
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
| let scoped_storage = (key, { storage = localStorage } = {}) => { | |
| return { | |
| get: ({ default = null } = {}) => { | |
| let value_stringified = localStorage.getItem(key); | |
| if (value_stringified == null) { | |
| return default; | |
| } | |
| try { |
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
| interface Request { | |
| _id: string, | |
| clientId: string, | |
| // Needed for custom title or to add something to the existing todo title. | |
| // For example: "Open Bank Account" + "(2 accounts)" | |
| title: string, | |
| // Required to set when opening a request. | |
| todoId: string, | |
| status: RequestStatus, | |
| steps: (ProposalStep)[], // Copied from Todo. Used to track progress. |
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
| #!/usr/bin/env node | |
| const util = require('util'); | |
| const exec = util.promisify(require('child_process').exec); | |
| let run = fn => fn(); | |
| run(async () => { | |
| try { | |
| let { stdout: git_status_output } = await exec('git diff --cached --name-status'); |