Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
function getRandomId() { | |
return "gge" + Math.round(Math.random() * 10000000); | |
} | |
const ids = api('getSelectedIds'); | |
const result = api('getSource', {type:'json'}); | |
function addWire(x1, y1, x2, y2) { | |
gId = getRandomId(); | |
result.wire[gId] = { |
const puppeteer = require('puppeteer'); | |
(async () => { | |
const browser = await puppeteer.launch(); | |
const page = await browser.newPage(); | |
// Adjustments particular to this page to ensure we hit desktop breakpoint. | |
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1}); | |
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'}); |
var request = require('request'); | |
var cheerio = require('cheerio'); | |
function fetchTitle(url, onComplete = null) { | |
request(url, function (error, response, body) { | |
var output = url; // default to URL | |
if (!error && response.statusCode === 200) { | |
var $ = cheerio.load(body); | |
console.log(`URL = ${url}`); |
"use strict" | |
let koa = require('koa'); | |
let Router = require('koa-router'); | |
let fs = require('fs'); | |
let assert = require('http-assert'); | |
let sscanf = require('scanf').sscanf; | |
let app = new koa(); | |
let router = new Router(); |
Author: https://www.cyanhall.com/
Core Animation's original name is Layer Kit
Core Animation is a compositing engine; its job is to compose different pieces of visual content on the screen, and to do so as fast as possible. The content in question is divided into individual layers stored in a hierarchy known as the layer tree
. This tree forms the underpinning for all of UIKit, and for everything that you see on the screen in an iOS application.
In UIView, tasks such as rendering, layout and animation are all managed by a Core Animation class called CALayer
. The only major feature of UIView that isn’t handled by CALayer is user interaction.
There are four hierarchies, each performing a different role:
I say "animated gif" but in reality I think it's irresponsible to be serving "real" GIF files to people now. You should be serving gfy's, gifv's, webm, mp4s, whatever. They're a fraction of the filesize making it easier for you to deliver high fidelity, full color animation very quickly, especially on bad mobile connections. (But I suppose if you're just doing this for small audiences (like bug reporting), then LICEcap is a good solution).
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.