Skip to content

Instantly share code, notes, and snippets.

@zmts
zmts / tokens.md
Last active July 5, 2024 13:58
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@nicksantamaria
nicksantamaria / fork-example.php
Created October 20, 2016 22:35
Example: Parallel processing in PHP using pcntl_fork()
<?php
/**
* @file
* Basic demonstration of how to do parallel threads in PHP.
*/
// This array of "tasks" could be anything. For demonstration purposes
// these are just strings, but they could be a callback, class or
// include file (hell, even code-as-a-string to pass to eval()).
1. Make Home Directory for SShH keys.
c://users/UserName/.SSH (for Windows 7)
2. Generate SSH key by command:
ssh-keygen -t rsa -C "user@mail.ru"
# Creates a new ssh key, using the provided email as a label
Generating public/private rsa key pair.
It's created a pair of keys - private and public in home dir .SSH
C:\Users\SuvorovAG\.ssh\id_rsa