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
| alias served="ruby -r webrick -e \"s = WEBrick::HTTPServer.new(:Port => 9090, :DocumentRoot => Dir.pwd); trap('INT') { s.shutdown }; s.start\"" |
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
| Check which process on which port | |
| lsof -i -n -P |
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
| fucntion fn () { | |
| setImmediate(function () { | |
| console.log('setImmediate'); | |
| }); | |
| process.nextTick(function () { | |
| console.log('nextTick'); | |
| }); | |
| } |
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
| reindent region C-M-\ | |
| cut region C-w | |
| copy region M-w | |
| yank C-y | |
| kill window C-x 0 | |
| kill window and buffer C-x 4 0 | |
| goto line M-g | |
| join current line to upper one M-^ | |
| Seach next C-s |
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
| /* | |
| Реализация i-statefull-block | |
| https://github.yandex-team.ru/Metrika/metrika-contrib/tree/master/blocks/common/i-statefull-block | |
| */ | |
| BEM.DOM.decl({block: 'stateful-parent', baseBlock: 'i-statefull-block'}, { | |
| onSetMod: { | |
| js: function () { | |
| this._model = BEM.blocks['m-parent'].create(); | |
| this.setStateModel(this._model); |
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
| cd $HOME | |
| git clone [email protected]:nik-garmash/.dotfiles.git | |
| cd $HOME/.dotfiles | |
| git submodule init && git submodule update | |
| cd $HOME | |
| if [ -f .bashrc ] | |
| then | |
| mv .bashrc .bashrc.b | |
| fi |
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
| cd $HOME | |
| rm .bash_it 2>/dev/null | |
| rm .bashrc 2>/dev/null | |
| rm .bash_profile 2>/dev/null | |
| rm .vimrc 2>/dev/null | |
| rm .tmux.conf 2>/dev/null | |
| rm .viminfo 2>/dev/null | |
| rm -rf .vim 2>/dev/null | |
| rm -rf .dotfiles 2>/dev/null | |
| rm -rf .tmux 2>/dev/null |
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
| function clientRender () { | |
| let root = document.body | |
| function createElement (name, attrs, children) { | |
| let element = document.createElement(name) | |
| Object.keys(attrs).forEach((attrName) => { | |
| element.setAttribute(attrName, attrs[attrName]) | |
| }) |
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
| show_exit_code() { | |
| local ex=$? | |
| if [ $ex -ne 0 ] | |
| then | |
| echo -e "\033[0;31m$ex\033[0m" | |
| fi | |
| } | |
| PROMPT_COMMAND="show_exit_code;$PROMPT_COMMAND" |
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 fs = require('fs') | |
| const { PerformanceObserver, performance } = require('perf_hooks'); | |
| const cheerio = require('cheerio') | |
| const { JSDOM } = require("jsdom") | |
| const { tokenize, constructTree } = require('hyntax') | |
| const html = fs.readFileSync('./github.html').toString() | |
| const obs = new PerformanceObserver((items) => { | |
| console.log(items.getEntries()) |
OlderNewer