| Method | Side effects1 | State updates2 | Example uses |
|---|---|---|---|
| Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
| Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
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
| /* eslint no-useless-escape: 0 */ | |
| /* eslint max-len: 0 */ | |
| /** | |
| * For more info regarding metro config: | |
| * @see https://facebook.github.io/metro/docs/en/configuration | |
| */ | |
| const path = require("path"); | |
| const fs = require("fs"); | |
| // Get blacklist factory |
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 bash -e | |
| HOST=${1:-cloudflare.com} | |
| FILENAME=${2:-${HOST%%.*}} | |
| # For file naming, see https://support.ssl.com/Knowledgebase/Article/View/19/0/der-vs-crt-vs-cer-vs-pem-certificates-and-how-to-convert-them | |
| # For HTTP Public Key Pinning (HPKP), see https://developer.mozilla.org/en-US/docs/Web/HTTP/Public_Key_Pinning | |
| CERTIFICATE_PEM="${FILENAME}_certificate.ascii.crt" | |
| CERTIFICATE_DER="${FILENAME}_certificate.crt" | |
| PUBKEY_PEM="${FILENAME}_pubkey.ascii.key" |
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
| class ViewController: UIViewController { | |
| @IBOutlet weak var tableView: UITableView! | |
| @IBOutlet weak var heightTableView: NSLayoutConstraint! | |
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| tableView.addObserver(self, forKeyPath: "contentSize", options: .new, context: nil) | |
| } | |
| override func viewWillDisappear(_ animated: Bool) { | |
| super.viewWillDisappear(animated) |
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
| bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
| # also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)
Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с данными сохранёнными в базе данных.
Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.
In your command-line run the following commands:
brew doctorbrew update
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
| // define shim for node.js | |
| (Symbol as any).asyncIterator = Symbol.asyncIterator || Symbol.for("Symbol.asyncIterator"); | |
| // helpers | |
| function sleep(ms: number) { | |
| return new Promise<void>(resolve => setTimeout(resolve, ms)); | |
| } | |
| async function returnAfter<T>(time: number, value: T) { | |
| await sleep(time); | |
| return value; |
NewerOlder