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
| function flattenDeep(array) { | |
| if (!(array instanceof Array)) { | |
| return array; | |
| } | |
| return array.reduce((flatArray, cell) => { | |
| return flatArray.concat(flattenDeep(cell)); | |
| }, []); | |
| } |
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 ConsultFormView from '../views/ConsultFormView' | |
| class ConsultFormController extends React.Component { | |
| state = {} | |
| render() { | |
| return ( | |
| <ConsultFormView> | |
| <name onChange={this.setName} /> |
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 execa = require('execa') | |
| const fs = require('fs') | |
| const tmp = require('tmp') | |
| // Main | |
| { | |
| const [anchor, amount = 1] = process.argv.slice(-2).map(Number) | |
| gitRebaseInteractive(anchor, function (operations, amount) { |
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
| const { spawn } = require('child_process') | |
| spawn('git', ['log']) |
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
| const { spawn } = require('child_process') | |
| spawn('git', ['log']).stdout.pipe(process.stdout) |
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
| const { spawn } = require('child_process') | |
| spawn('git', ['log'], { | |
| stdio: 'inherit' // Will use process .stdout, .stdin, .stderr | |
| }) |
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
| const { execFile } = require('child_process') | |
| execFile('git', ['log'], (err, out) => { | |
| if (err) { | |
| console.error(err) | |
| } | |
| else { | |
| console.log(out) | |
| } | |
| }) |
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 { DocumentNode, GraphQLError } from 'graphql' | |
| import { OperationVariables, FetchPolicy } from 'apollo-client' | |
| import { useEffect, useMemo, useRef, useState } from 'react' | |
| import { useApolloClient } from 'react-apollo-hooks' | |
| import * as isEqual from 'react-fast-compare' | |
| export type SubscriptionOptions<TVariables> = { | |
| variables?: TVariables; | |
| fetchPolicy?: FetchPolicy; | |
| } |
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
| function observerCallback (mutations, observer) { | |
| // Will cause more mutations | |
| updateStyle(mutations) | |
| // Will dispose pending mutations | |
| observer.takeRecords() | |
| } |
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
| git_sequence_editor () { | |
| if test -z "$GIT_SEQUENCE_EDITOR" | |
| then | |
| GIT_SEQUENCE_EDITOR="$(git config sequence.editor)" | |
| if [ -z "$GIT_SEQUENCE_EDITOR" ] | |
| then | |
| GIT_SEQUENCE_EDITOR="$(git var GIT_EDITOR)" || return $? | |
| fi | |
| fi |
OlderNewer