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
| # ================================================================================================== | |
| # | |
| # NOTICE | |
| # | |
| # This gist is no longer maintained. It was moved to repo: | |
| # | |
| # https://github.com/maratori/golangci-lint-config | |
| # | |
| # Full history and all v2 releases are preserved in the repo. | |
| # |
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
| class LruCache<T> { | |
| private values: Map<string, T> = new Map<string, T>(); | |
| private maxEntries: number = 20; | |
| public get(key: string): T { | |
| const hasKey = this.values.has(key); | |
| let entry: T; | |
| if (hasKey) { | |
| // peek the entry, re-insert for LRU strategy |
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
| infocmp | ssh $remote "cat > $TERM.ti ; tic -o ~/.terminfo $TERM.ti" |