Skip to content

Instantly share code, notes, and snippets.

View chrishiste's full-sized avatar
Too much CIDR? Have a REST

Chris Histe chrishiste

Too much CIDR? Have a REST
  • Weights & Biases
View GitHub Profile
matthargett /
Created November 19, 2018 21:00
TypeScript versus flowtype

First, let's note the difference in philosophy: TypeScript aims for fast analysis because you can to compile it down to JS before you can run/test it. flowtype is meant to be an async analysis that can run continuously with changes since the last analysis, or in parallel with your eslint and bundler rules. As such, flowtype's type system and analysis is not quite as concerned with speed or memory usage in service of potentially finding more bugs.

On two occasions I have tried to roll out flow in React Native applications, and on those two occasions we ended up backing out after a few weeks. Some detail: flow doesn't have a public roadmap, and what version you use is dictated by the react/react-native dependency and the annotations in react-native itself. flowtype also has some hard-coded aspects to help the analysis for React, so major updates to React itself sometimes also require updating flowtype to match. React Native upgrades then get gated based on your dependent libraries (or flow-typed) being updated

hk-skit / js-oneliner.js
Last active January 9, 2024 23:46
Useful Array One-liners.
View js-oneliner.js
// Remove Duplicates from an array
const removeDuplicates =
arr => arr.filter((item, index) => index === arr.indexOf(item));
const removeDuplicates1 = array => [ Set(array)];
const removeDuplicates2 = array => Array.from(new Set(array));
// Flattens an array(doesn't flatten deeply).
zeroseis /
Created September 14, 2015 17:28
Disable auto start for Android File Transfer
  • Close Android File Transfer
  • Open Activity Monitor and kill “Android File Transfer Agent”
  • Go to where you installed “Android File” (I have it under /Applications)
  • Ctrl+click –> “Show package contents”
  • Go to Contents/Resources
  • Rename “Android File Transfer Agent” to e.g. “Android File Transfer Agent_DISABLED”
  • Then go to “/Users/username/Library/Application Support/Google/Android File Transfer” and again rename the Agent app.
staltz /
Last active February 20, 2024 02:20
The introduction to Reactive Programming you've been missing
kevinSuttle /
Last active February 5, 2024 21:31 — forked from lancejpollard/
List of Usable HTML Meta and Link Tags