Skip to content

Instantly share code, notes, and snippets.

View everget's full-sized avatar
🎯
Focusing

Alex Orekhov everget

🎯
Focusing
View GitHub Profile
@everget
everget / tokens.md
Created September 26, 2023 13:21 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов

defaults:

  • npm config set init-author-name ""
  • npm config set init-author-url ""
  • npm config set init-author-email ""
  • npm config set init-license "ISC"
  • npm config set init-version "1.0.0"

custom (example)

  • npm config set init-author-name "Tierney Cyren"
  • npm config set init-author-url "https://bnb.im"
@everget
everget / js-feature-detection.md
Last active June 1, 2018 18:19
Summary of JavaScript feature detection techniques

Member in object

Check whether a certain method or property (typically an entry point into using the API or other feature you are detecting for) exists in its parent Object

Check if a certain property exists on a global object (such as window or navigator)

if("geolocation" in navigator) { ... }
@everget
everget / javascript-operator-precedence.md
Last active May 5, 2017 12:42
JavaScript Operator Precedence
Value Operator Description Example
19 ( ) Expression grouping (3 + 4)
18 . Member person.name
18 [] Member person["name"]
17 () Function call myFunction()
17 new Create new Date()
16 ++ Postfix Increment i++
16 -- Postfix Decrement i--
15 ++ Prefix Increment ++i
@everget
everget / angular-just-say-no.md
Created April 25, 2017 21:02 — forked from tdd/angular-just-say-no.md
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@everget
everget / ArrayScript.js
Created February 12, 2017 14:02
The new look at scripting process...
// ArrayScript...or as I would have nothing to do
let testSuite = [
'Awesome',
'epic fail',
'remember,remember',
'to be or not to be...',
'DealerPoint is awesome...',
'The best code is the one that doesn`t exist...',
'Whatever the mind can conceive and believe, the mind can achieve. — Napoleon Hill',
@everget
everget / grouping-css-props.md
Last active January 12, 2017 16:51
CSS Properties grouping order

CSS Properties grouping order

The useful technique for CSS styling... This technique eliminates the need to spend your time for searching properties in alphabethical order

Why?

  • CSS-properties are composed by the role each of them provides, not in alphabethical order (famous wrong practices);

  • You haven't to waste your time finding CSS property in an alphabethical garbage;

  • So, your eyes don't work a needless job.