A collection of asynchronous fetching examples with various frameworks and patterns.
Moved to omg-counters
This is a collection of increment/decrement counters using various frontend frameworks.
The increment/decrement counter is the step between a hello world example and a todo app. Please note that the examples are supposed to be as minimal as possible.
So far we have the following:
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
| // placeholder |
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
| module Counter = { | |
| include ReactRe.Component.Stateful; | |
| let name = "Counter"; | |
| type state = {count: int}; | |
| type props = unit; | |
| let getInitialState _ => {count: 0}; | |
| /** increment handler */ | |
| let handleIncrement {state} _ => { | |
| Js.log "clicked increment!"; |
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-beautify@0.29.17 | |
| atom-ternjs@0.17.0 | |
| atom-typescript@10.1.13 | |
| autocomplete-modules@1.6.7 | |
| ayu@0.1.0 | |
| color-picker@2.2.5 | |
| css-snippets@1.1.0 | |
| docblockr@0.9.1 | |
| emmet@2.4.3 | |
| file-icons@2.0.14 |
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
| // throw these two lines into the markup: | |
| // <button id="btn">Click</button> | |
| // <script src="https://unpkg.com/@reactivex/rxjs/dist/global/Rx.js"></script> | |
| const button = document.querySelector('#btn'); | |
| const click$ = Rx.Observable.fromEvent(button, 'click'); | |
| click$ | |
| .map(() => Date.now()) | |
| .bufferTime(5000) |
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
| [color] | |
| ui = true | |
| [user] | |
| name = Adrian Li | |
| email = li.adrianmc@gmail.com | |
| [core] | |
| editor = /usr/bin/vim | |
| excludesfile = /Users/liadrian/.gitignore | |
| [alias] | |
| adc = !git add -A && git commit |
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
| module.exports = { | |
| config: { | |
| // default font size in pixels for all tabs | |
| fontSize: 12, | |
| // font family with optional fallbacks | |
| fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
| // terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
| cursorColor: 'rgba(248,28,229,0.8)', |
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
| # If you come from bash you might have to change your $PATH. | |
| # export PATH=$HOME/bin:/usr/local/bin:$PATH | |
| # Path to your oh-my-zsh installation. | |
| export ZSH=/Users/adrianli/.oh-my-zsh | |
| # Set name of the theme to load. Optionally, if you set this to "random" | |
| # it'll load a random theme each time that oh-my-zsh is loaded. | |
| # See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes | |
| ZSH_THEME="robbyrussell" |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would