code --install-extension aaron-bond.better-comments
code --install-extension Angular.ng-template
code --install-extension bradlc.vscode-tailwindcss
code --install-extension csstools.postcss
code --install-extension dbaeumer.vscode-eslint
code --install-extension EditorConfig.EditorConfig
code --install-extension esbenp.prettier-vscode
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
{ | |
"window.title": "${dirty}${appName} ¯\\_(ツ)_/¯ ${rootName}", | |
"editor.tabSize": 2, | |
"terminal.integrated.smoothScrolling": true, | |
"editor.inlineSuggest.enabled": true, | |
"editor.cursorSmoothCaretAnimation": "on", | |
"editor.smoothScrolling": true, | |
"editor.minimap.enabled": true, | |
"editor.stickyScroll.enabled": false, | |
"editor.inlayHints.enabled": "on", |
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 node | |
import fs from "fs/promises"; | |
import path from "path"; | |
import { fileURLToPath } from "url"; | |
import { unified } from "unified"; | |
import rehypeParse from "rehype-parse"; | |
import { VFile } from "vfile"; | |
import { write } from "to-vfile"; | |
import generate from "@babel/generator"; |
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
/** | |
* RuntimeGlobalsChecker | |
* | |
* You can use this utility to quickly check what variables have been added (or | |
* leaked) to the global window object at runtime (by JavaScript code). | |
* By running this code, the globals checker itself is attached as a singleton | |
* to the window object as "__runtimeGlobalsChecker__". | |
* You can check the runtime globals programmatically at any time by invoking | |
* "window.__runtimeGlobalsChecker__.getRuntimeGlobals()". | |
* |
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
/** | |
* GlobalsDebugger | |
* | |
* Inspect the stack when a global variable is being set on the window object. | |
* Given a global variable name, it proxies the variable name in the window | |
* object adding some custom code that will be invoked whenever the variable | |
* is set. The custom code will log the current stack trace and halt the code | |
* execution to allow inspecting the stack and context in your browser DevTools. | |
* You can use the "globalsToInspect" query-parameter to set a comma-separated | |
* list of names of the variables you want to inspect. |
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
Windows Registry Editor Version 5.00 | |
;=== Disable === | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings] | |
"AutoConfigURL"=- | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap] | |
"ProxyBypass"=dword:00000001 | |
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1] |
Я никак не могу обойти тему того чем является тайпскрипт, и чем он должен был быть.
"TypeScript is JavaScript with syntax for types." www.typescriptlang.org
Это именно то что отличает тайпскрипт он кофескриптов, эльмов, ризонов и т.д. Все что нужно чтобы получить javascript - убрать аннотации типов. В вебе, где размер бандла одна из ключевых метрик, это - киллер фича.
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
import React, { useState } from 'react' | |
const Nothing = Symbol() | |
const normDoubleSymbol = (strOrNumber: string | number) => strOrNumber.toString().length === 1 | |
? `0${strOrNumber}` | |
: strOrNumber.toString() |
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
/** | |
* Fill localStorage to its maximum capacity. | |
* | |
* First, we find the highest order bit (the bit with the highest place value) | |
* that fits in localStorage by storing localStorage an increasingly big | |
* string of length 2, 4, 8, 16, etc. until it won't fill localStorage anymore. | |
* | |
* By working in iterations, starting with very long strings, and storing data | |
* in different items, we can keep a low memory profile and reduce the number of | |
* writes — making this process pretty fast. |
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
/** | |
* Determines whether an error is a QuotaExceededError. | |
* | |
* Browsers love throwing slightly different variations of QuotaExceededError | |
* (this is especially true for old browsers/versions), so we need to check | |
* different fields and values to ensure we cover every edge-case. | |
* | |
* @param err - The error to check | |
* @return Is the error a QuotaExceededError? | |
*/ |