- https://fishshell.com/ - мой дефолтный шелл, я использую тему bobthefish
- https://www.sublimetext.com/ - дефолтный текстовый редактор
- Material Theme
- Operator font
- Пакеты: Emmet, Hayaku, SidebarEnhancements, JS Snippets, GSAP Snippets
- Снипет для комментирования
- Иконка приложения
- https://code.visualstudio.com/ - пытаюсь его использовать, но пока не переехал
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
| #!/usr/bin/env bash | |
| # | |
| # Slack Support Library (v1.0.0) | |
| # System colors | |
| YELLOW='\033[1;33m' | |
| BLUE='\033[1;34m' | |
| RED='\033[0;31m' | |
| NC='\033[0m' |
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 ENOUGH_TIME = 1; // milliseconds | |
| let workQueue = []; | |
| let nextUnitOfWork = null; | |
| function schedule(task) { | |
| workQueue.push(task); | |
| requestIdleCallback(performWork); | |
| } |
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 PromiseSimple { | |
| constructor(executionFunction) { | |
| this.promiseChain = []; | |
| this.handleError = () => {}; | |
| this.onResolve = this.onResolve.bind(this); | |
| this.onReject = this.onReject.bind(this); | |
| executionFunction(this.onResolve, this.onReject); | |
| } |
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 cacheName = 'v1'; | |
| this.addEventListener('install', function(event) { | |
| event.waitUntil( | |
| caches.open(cacheName).then(function(cache) { | |
| return cache.addAll([ | |
| 'index.html', | |
| 'common.css' | |
| ].map(u => new Request(u, { credentials: 'include' }))) | |
| }).then(()=> console.log('done')) | |
| ); |
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 server = http2.createSecureServer(options); | |
| const commonCSS = fs.readFileSync('common.css'); | |
| server.on('stream', (stream, headers) => { | |
| console.log(`${headers[':method']} ${headers[':path']}`); | |
| const parsedUrl = url.parse(headers[':path']); | |
| let pathname = `.${parsedUrl.pathname}`; | |
| const ext = path.parse(pathname).ext; | |
| if (headers[':path'] === '/index.html') { | |
| stream.pushStream({ ':path': 'common.css' }, |
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 http2 = require('http2'); | |
| const fs = require('fs'); | |
| const url = require('url'); | |
| const path = require('path'); | |
| const options = { | |
| key: fs.readFileSync('key.pem'), | |
| cert: fs.readFileSync('cert.pem') | |
| }; | |
| const mimeType = { | |
| '.ico': 'image/x-icon', |
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 createLoggedProxy(obj) { | |
| var traps = {}; | |
| for (let trap of Object.getOwnPropertyNames(Reflect)) { | |
| traps[trap] = (...args) => { | |
| console.log(trap, ...args.slice(0, -1)); // Last arg is always the proxy, no need to log it | |
| return Reflect[trap](...args); | |
| } | |
| } | |
This is a CFP for the ⚡️Lightning⚡️ talk at awesome ReactiveConf 2017. If you'd like to see this talk, please 🌟 star🌟 this summary and retweet my tweet 🙂 #ReactiveConf
Functional reactive programming (FRP) is very popular nowadays. The JavaScript community provides us with excellent tools like RxJS, Bacon, and Kefir. But, as we know, they have nothing to do with React. So how we can use the power of FRP in our React application? Using the correct state management, we can make friends with FRP and React and make our application truly reactive. In my lightning talk, I will talk about Focal
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
| app.use((req, res, next) => { | |
| const begin = Date.now() | |
| res.on('finish', () => console.log( | |
| "method", req.method, | |
| "url", req.url, | |
| "took", Date.now() - begin | |
| )) | |
| return next() | |
| }) |
