This gist is outdated. The new one here https://gist.github.com/myshov/a90e21ea0b69d47b9792a3522de628be
Этот gist устарел. Новый gist находится здесь https://gist.github.com/myshov/a90e21ea0b69d47b9792a3522de628be
This file contains 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 { isType } from './typeguardHelper'; | |
import { Car, carRuleSet, Engine, engineRuleSet, Wheel, wheelRuleSet } from './Car'; | |
const mockEngine: Engine = { | |
cylinders: 8, | |
maxSpeed: 7400, | |
fuelType: 'diesel' | |
}; | |
const mockWheel: Wheel = { |
This file contains 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
tmuxSessionWork="work" | |
tmux start-server | |
tmux new-session -d -s $tmuxSessionWork -n vim | |
tmux new-window -t $tmuxSessionWork:2 -n ssh | |
tmux selectp -t 1 | |
tmux send-keys "cd projects" C-m | |
tmux splitw -h -p 50 | |
tmux new-window -t $tmuxSessionWork:3 -n bash | |
tmux select-window -t $tmuxSessionWork:1 | |
tmux attach-session -t $tmuxSessionWork |
https://github.com/myshov/codemodes-tycoon - codemodes из презентации
https://github.com/facebook/jscodeshift - jscodeshift
https://github.com/benjamn/ast-types/blob/master/def - определения AST-узлов
https://www.toptal.com/javascript/write-code-to-rewrite-your-code - статья с хорошими примерами
https://astexplorer.net - инспектор ast
This file contains 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
README.md:1:1 | |
✖ 1:1 Missing Awesome badge after the main heading awesome/badge | |
✖ 13:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 14:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 15:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 16:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 17:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 18:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent | |
✖ 19:5 Incorrect indentation before bullet: remove 2 spaces list-item-bullet-indent |
Note:
When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.
If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:
- Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
This file contains 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
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |
This file contains 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
Functional parsing library from chapter 8 of Programming in Haskell, | |
Graham Hutton, Cambridge University Press, 2007. | |
> module Parsing where | |
> | |
> | |
> import Data.Char | |
> import Control.Monad | |
> import qualified Control.Applicative as CA |
This file contains 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
// Generator can be helpful for linearizing async logic. | |
// It allows you to "pause" code execution with "yield" | |
// and run to the next "yield" or end of generator with "next" | |
function* helloGen() { | |
// 1: 2: | |
var str = yield ' bro'; | |
// 3: | |
console.log(str); | |
} |
This file contains 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
# Redis configuration file example | |
# Note on units: when memory size is needed, it is possible to specifiy | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# | |
# 1k => 1000 bytes | |
# 1kb => 1024 bytes | |
# 1m => 1000000 bytes | |
# 1mb => 1024*1024 bytes | |
# 1g => 1000000000 bytes |