Skip to content

Instantly share code, notes, and snippets.

View lyleunderwood's full-sized avatar
💭
working

Lyle Underwood lyleunderwood

💭
working
  • ShowLabs Inc.
  • Sacramento, CA
View GitHub Profile
const unsealedObjectError = () => 'Flow interprets empty objects literals as unsealed objects,' +
' see https://git.io/fj64j';
module.exports = {
'no-unsealed-objects': {
meta: {
docs: {
description: 'no unsealed objects',
category: 'Possible Errors',
recommended: false,
// @flow
import * as React from 'react';
import { List, AutoSizer, CellMeasurer, CellMeasurerCache } from 'react-virtualized';
import styled from 'styled-components';
import isFirefox from 'is-firefox';
import Translate from '../translate';
import Spinner from '../spinner';
export type RowRenderer = $ReadOnly<{|
type Operation = {
behavior: Function,
timeAdded: integer,
msDelay: integer,
};
class OperationQueue {
operations: Operation[] = [];
operationsForTime(time) {
$ make clean && make
ocamlbuild -clean
Finished, 0 targets (0 cached) in 00:00:00.
00:00:00 0 (0 ) STARTING -------- |rm -rf bin
rm -f hack/utils/get_build_id.gen.c
rm -f flow.odocl
ocamlbuild -use-ocamlfind -no-links -I scripts scripts/ppx_gen_flowlibs.native
+ ocamlfind ocamlc -c -safe-string -w A -warn-error A -package core_kernel -package unix -package wtf8 -package compiler-libs.common -w -4-6-29-35-44-48-50 -package ppx_deriving -package dtoa -I scripts -I src/parser_utils/output/__tests__/js_layout_generator -o scripts/ppx_gen_flowlibs.cmo scripts/ppx_gen_flowlibs.ml
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /usr/lib/ocaml/compiler-libs, /usr/lib/ocaml
+ ocamlfind ocamlopt -c -safe-string -w A -warn-error A -package core_kernel -package unix -package wtf8 -package compiler-libs.common -w -4-6-29-35-44-48-50 -pac
$ make
ocamlbuild -use-ocamlfind -no-links -I scripts scripts/ppx_gen_flowlibs.native
+ ocamlfind ocamlc -c -safe-string -w A -warn-error A -package core_kernel -package unix -package wtf8 -package compiler-libs.common -w -4-6-29-35-44-48-50 -package ppx_deriving -package dtoa -I scripts -I src/parser_utils/output/__tests__/js_layout_generator -o scripts/ppx_gen_flowlibs.cmo scripts/ppx_gen_flowlibs.ml
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /usr/lib/ocaml/compiler-libs, /usr/lib/ocaml
+ ocamlfind ocamlopt -c -safe-string -w A -warn-error A -package core_kernel -package unix -package wtf8 -package compiler-libs.common -w -4-6-29-35-44-48-50 -package ppx_deriving -package dtoa -I scripts -I src/parser_utils/output/__tests__/js_layout_generator -o scripts/ppx_gen_flowlibs.cmx scripts/ppx_gen_flowlibs.ml
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /usr/lib/ocaml/compiler-libs, /usr/lib/ocaml
File "_none_", line 1:
Error (warning 58): no cmx file was fou
type ScrollToOptions = {
top?: number;
left?: number;
behavior?: 'auto' | 'smooth';
}
declare class ScrollingElement extends Element {
scroll(x: number, y: number): void;
scroll(options: ScrollToOptions): void;
scrollTo(x: number, y: number): void;
#!/bin/bash
set -e
set -E
LIST=`find src/modules/api/response-types -regex '.*\.js$'`
for TYPE in $LIST; do
RESPONSE_DEF="\"\$ref\": \"#\/definitions\\/`echo $TYPE | sed 's/\.js$//' | sed 's/\//::/g'`::Response\","
if ! grep --quiet "Response" $TYPE; then
echo "No Response type defined in $TYPE." > /dev/stderr
exit 1
fi
const takeByPattern = (lists, pattern) => {
let listsCopy = lists.map(l => l.slice());
let relevantLists = listsCopy.filter((l, idx) => pattern.includes(idx));
let finalList = [];
const totalRemaining = () => relevantLists.map(l => l.length).reduce((sum, count) => sum + count, 0);
while(totalRemaining() > 0) {
pattern.forEach(idx => finalList.push(listsCopy[idx].shift()));
}
@lyleunderwood
lyleunderwood / Reduce.js
Last active November 22, 2017 21:48 — forked from csclyde/Reduce.js
groupsCalculated: (state) => {
const buildNetwork = (connection) => ({ service_id: connection.service_id, login_id: connection.login_id });
const connectionWithNetwork = (conn, net) => ({ ...conn, networks: [...conn.networks, buildNetwork(net)] });
const buildConnection = (conn) => ({ name: conn.name, id: conn.id, networks: [] });
return Object.values(state.all.reduce((acc, curr) => (acc[curr.name] ?
{ ...acc, [curr.name]: connectionWithNetwork(acc[curr.name], curr) } :
{ ...acc, [curr.name]: connectionWithNetwork(buildConnection(curr), curr) }
scrot -s /tmp/screen.png && xclip -t image/png -selection clipboard /tmp/screen.png