- http://stackoverflow.com/questions/804115 (
rebase
vsmerge
). - https://www.atlassian.com/git/tutorials/merging-vs-rebasing (
rebase
vsmerge
) - https://www.atlassian.com/git/tutorials/undoing-changes/ (
reset
vscheckout
vsrevert
) - http://stackoverflow.com/questions/2221658 (HEAD^ vs HEAD~) (See
git rev-parse
) - http://stackoverflow.com/questions/292357 (
pull
vsfetch
) - http://stackoverflow.com/questions/39651 (
stash
vsbranch
) - http://stackoverflow.com/questions/8358035 (
reset
vscheckout
vsrevert
)
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
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 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 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
"use strict"; | |
// animation utils | |
// =============== | |
const trackTime = timing => { | |
const now = performance.now(); | |
if (!timing.startTime) timing.startTime = now; | |
const elapsed = now - timing.startTime; |
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
"use strict"; | |
// animation utils | |
// =============== | |
const trackTime = id => { | |
const [entry] = performance.getEntriesByName(id); | |
if (!entry) { | |
performance.mark(id); |
- 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 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
/* eslint-disable prefer-template */ | |
const path = require('path'); | |
const aliases = require('./aliases'); | |
// /////////////////////////////////////////////////////////////// | |
// ////////////////// PLUGINS //////////////////////////////// | |
// /////////////////////////////////////////////////////////////// | |
const commonPlugins = [ |
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
# Example: test.com/images/cats.jpeg?w=100&h=100 | |
location ~* ^/images/(.+\.(?:jpe?g|png|gif))$ { | |
set $image_name $1; | |
set $demins "${arg_w}x${arg_h}"; | |
set $check_str "${demins}"; | |
# check that original size file exists | |
if ( -f $request_filename ) { | |
set $check_str "${check_str}F1"; |
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
// Players | |
class ClickCounter { | |
constructor() { this.clicks = 0; } | |
onclick(e) { this.clicks += (e.type === 'click') ? 1 : -1; } | |
} | |
class Handler extends ClickCounter { | |
constructor(currentTarget) { | |
super(); | |
currentTarget.addEventListener('click', this); |
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
@mixin valid-quantity($quantity) { | |
@if type-of($quantity) != 'number' { | |
@error 'The "quantity" parameter must be a number!'; | |
} | |
@if not(unitless($quantity)) { | |
@error 'The "quantity" parameter must not have a unit!'; | |
} | |
@if $quantity < 0 { | |
@error 'The "quantity" parameter must be at least 0!'; | |
} |