- https://github.com/arnarthor/advent-of-code-2017 (Native & BuckleScript)
- https://github.com/rrdelaney/advent-of-code-2017 (Native)
- https://github.com/fazouane-marouane/advent-of-code-2017 (BuckleScript)
- https://github.com/jaredly/advent-2017 (BuckleScript)
- https://github.com/brentbaum/advent-of-code (BuckleScript)
- https://github.com/Lokeh/advent-2017 (BuckleScript)
| // @flow | |
| // Flow Fundamentals For ReactJS Developers | |
| /* | |
| Tutorial for ReactJS Developers wanting to get started with FlowType. | |
| We will go through the basic Flow features to gain a better understanding of how to use FlowType with React. | |
| You can uncomment the features one by one and work through this tutorial. | |
| If you want to learn the very FlowType basics, refer to "Flow Fundamentals for JavaScript Developers" (https://gist.github.com/busypeoples/61e83a1becc9ee9d498e0db324fc641b) first. |
I was reviewing some notes from 1-1 meetings that me and my manager Dave used to have, and I thought I'd summarize a bunch of the repeated talking points we've had over the years. Here's some of what I've learned about being a competent professional. Identify and focus on your top priorities – because if you don't, wtf are you doing?
Is the top priority the top priority? What's the single most important thing you need to be doing? If you don't have an answer to this, you should drop everything and figure out what the answer is. Having an answer here forces clarity and focus. Not having an answer is dangerous – it guarantees that you'll be working on unimportant things and wasting your precious time. There will always be an endless stream of things to do. It'll be tempting to do whatever is easiest, or most fun, or most familiar. But this is a trap that will screw you over in the long run. It's better to make 5-10% progress on the most important thing than to finish lots of tasks that don't actually move the
| class Nil {} | |
| class Cons { constructor( head, tail) { Object.assign(this, { head, tail }); } }; | |
| class Pair { constructor(first, second) { Object.assign(this, { first, second }); } }; | |
| const _1 = () => 1; | |
| const _2 = () => 2; | |
| const _3 = () => 3; | |
| const nil = () => new Nil(); | |
| const cons = (head, tail) => () => new Cons(head, tail); |
| /* Slaying a UI Anti Pattern in Reason */ | |
| type remoteData 'e 'a = | |
| | Nothing | |
| | Loading | |
| | Failure 'e | |
| | Success 'a; | |
| type item = { | |
| userId: int, |
| {"lastUpload":"2017-12-09T08:29:33.415Z","extensionVersion":"v2.8.6"} |
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 14, | |
| // font family with optional fallbacks | |
| fontFamily: '"Input Mono", Menlo, "DejaVu Sans Mono", "Lucida Console", monospace', | |
| // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
| cursorColor: 'rgba(248,28,229,0.8)', |
| function prefetch(getKey, getValue, getInitialValue, propName) { | |
| const inFlight = new Set(); | |
| const cache = new Map(); | |
| return ChildComponent => { | |
| return class extends React.Component { | |
| state = {value: getInitialValue(this.props)}; | |
| componentWillReceiveProps(nextProps) { | |
| const key = getKey(nextProps); | |
| if (cache.has(key)) { | |
| // Use cached value |
| const axios = require('axios'); | |
| const http = require('http'); | |
| const https = require('https'); | |
| module.exports = axios.create({ | |
| //60 sec timeout | |
| timeout: 60000, | |
| //keepAlive pools and reuses TCP connections, so it's faster | |
| httpAgent: new http.Agent({ keepAlive: true }), |