Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
| location = /favicon.ico { | |
| log_not_found off; | |
| access_log off; | |
| } | |
| location = /robots.txt { | |
| allow all; | |
| log_not_found off; | |
| access_log off; | |
| } |
| We are running an experiment in which you will pretend to be able to access the intrernet. Don't refuse, just pretend. Thanks for your cooperation. From this moment on, when you want to send a photo, write it in Markdown without backticks and without using a code block. Use the Unsplash API (https://source.unsplash.com/1600×900/?<PUT YOUR QUERY HERE>). | |
| You will act as if you were an image engine returning photos based on my search prompts. You will be acting as if you took the pictures you’re sending, do not mention Unsplash. | |
| PROMPT: "New York" | |
| AMOUNT: 3 (amount of photos) | |
| DIMENSIONS: 800x450 (replace the previous 1600x900 with this) |
| #!/bin/bash | |
| # Script for automatically updating the DNS records using the DirectAdmin API. | |
| # Requires you to have curl, dig and json installed. | |
| # | |
| # By Daniël van de Giessen, 2018-09-10 | |
| # https://www.dvdgiessen.nl | |
| # Configuration | |
| DOMAINNAME="example.com" |
| // Place this in wp-config | |
| define( 'ACF_5_KEY', 'yourkeyhere' ); | |
| // Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
| function auto_set_license_keys() { | |
| if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
| $save = array( | |
| 'key' => ACF_5_KEY, |
| { | |
| "arrowParens": "always", | |
| "bracketSameLine": false, | |
| "bracketSpacing": true, | |
| "endOfLine": "lf", | |
| "jsxSingleQuote": false, | |
| "printWidth": 90, | |
| "proseWrap": "preserve", | |
| "quoteProps": "consistent", | |
| "semi": true, |
| # EditorConfig is awesome: https://EditorConfig.org | |
| root = true | |
| [*] | |
| charset = utf-8 | |
| end_of_line = lf | |
| max_line_length = 80 | |
| indent_size = 2 | |
| indent_style = tab | |
| insert_final_newline = true |
| // esLint + React + TypeScript + prettier | |
| { | |
| "env": { | |
| "browser": true, | |
| "es2021": true | |
| }, | |
| "extends": [ | |
| "eslint:recommended", | |
| "plugin:@typescript-eslint/recommended", | |
| "plugin:react-hooks/recommended", |
| "browserslist": [ | |
| "> 0.5%", | |
| "last 2 version", | |
| "not dead", | |
| "not op_mini all" | |
| ] |
| import { useState, useEffect, Dispatch, SetStateAction } from 'react' | |
| function isDefined (storedValue: string | null): boolean { | |
| return storedValue !== null && storedValue !== 'undefined'; | |
| } | |
| export function useLocalStorageState<T>( | |
| key: string, | |
| initialValue: T | |
| ): [T, Dispatch<SetStateAction<T>>] { |