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
| let countBits = (x) => x.toString(2).replace(/0/g, "").length; | |
| let sortBits = (x) => [...x].sort((a, b) => countBits(a) - countBits(b)); | |
| module.exports.sortBits = sortBits; |
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
| /** | |
| * @typedef LexemType | |
| * @type {'data' | 'startTagStart' | 'endTagStart' | 'selfClosedTagEnd' | 'tagEnd' | 'tagName'} | |
| */ | |
| /** @type {{ [lexem: string]: LexemType }} */ | |
| const Lexem = { | |
| startTagStart: "startTagStart", // `<` in `<div>` | |
| endTagStart: "endTagStart", // `</` in `</div> | |
| selfClosedTagEnd: "selfClosedTagEnd", // `/>` in `<br />` |
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
| const Token = { | |
| operator: "operator", | |
| parensOpen: "parensOpen", | |
| parensClose: "parensClose", | |
| number: "number" | |
| }; | |
| const Operator = { | |
| add: "add", | |
| subtract: "subtract", |
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
| πππ |
This file has been truncated, but you can view the full file.
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
| {"arguments":[{"MessageId":0,"SendlerId":"40032bde-37aa-47c9-9000-7c479f2bb725","RecipientId":"ad43e0ed-5bd6-494d-87ad-f2115ca14a20","MessageText":"asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf asdf a |
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
| /** | |
| * Shared interfaces between the modules 'redux-saga' and | |
| * 'redux-saga/effects' | |
| */ | |
| declare interface $npm$ReduxSaga$Channel { | |
| take: (cb: (msg: mixed) => void) => void, | |
| put: (msg: mixed) => void, | |
| close: Function, | |
| } |
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
| 8893 |
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
| git log --pretty=format: --shortstat --no-merges --author=$1 \ | |
| | sed '/^$/d'\ | |
| | awk -F' ' '{s1+=$4;s2+=$6}END{printf "additions: %s; deletions: %s\n",s1,s2}' |
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
| # to get commit messages of user 'rgusev' betwen 2017-01-01 and 2017-31-12 | |
| # sh gitcommitsbydate.sh rgusev 2017-01-01 2017-31-12 | |
| git log --author=$1 --pretty=format:"%s" --no-merges --after="$2" --before="$3" |
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
| const assert = require('assert'); | |
| function flatten(array) { | |
| // Return argument if it isn't an array | |
| if (!Array.isArray(array)) { | |
| return array; | |
| } | |
| const result = []; |