Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
" Простая конфигурация Vim для пользователей с русско-английской клавиатурой | |
" Как правило, русскоязычных (duh) | |
" Минималистичная, минимум плагинов, но с развёрнутым описанием каждой функции, настройки и команды | |
" Работает для Vim 8.*, скомпилированного по максимуму. | |
" Чистый конфиг, без использования менеджеров плагинов. | |
" Цветовые схемы вручную копировал в папку ~/.vim/ | |
" Также, ручками добавил | |
" lightline и NERDTree в ~/.vim/pack/plugins/start, |
#!/bin/bash | |
# https://www.shellhacks.com/ru/bash-test-if-file-exists/ | |
# https://habr.com/ru/company/ruvds/blog/325928/ | |
# http://qaru.site/questions/41427/how-to-check-if-a-file-contains-a-specific-string-using-bash | |
# http://blog.richim.org/2011/10/bash.html | |
# Check the script is being run by root | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" |
// POLYFILLS | |
// Event.composedPath | |
// Possibly normalize to add window to Safari's chain, as it does not? | |
(function(E, d, w) { | |
if(!E.composedPath) { | |
E.composedPath = function() { | |
if (this.path) { | |
return this.path; | |
} | |
var target = this.target; |
export async function resizeImageData (imageData, width, height) { | |
const resizeWidth = width >> 0 | |
const resizeHeight = height >> 0 | |
const ibm = await window.createImageBitmap(imageData, 0, 0, imageData.width, imageData.height, { | |
resizeWidth, resizeHeight | |
}) | |
const canvas = document.createElement('canvas') | |
canvas.width = resizeWidth | |
canvas.height = resizeHeight | |
const ctx = canvas.getContext('2d') |
//----------------------------------*\ | |
// TRIGONOMETRY FUNCTIONS | |
//----------------------------------*/ | |
// # Trigonometry in CSS | |
// | |
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf | |
// - Useful if you don't want to use JS. | |
// - With CSS Variables. | |
// - `calc()` can't do power (x ^ y) so I used multiplication instead. |
/** | |
* Get path data for a rounded rectangle. Allows for different radius on each corner. | |
* @param {Number} w Width of rounded rectangle | |
* @param {Number} h Height of rounded rectangle | |
* @param {Number} tlr Top left corner radius | |
* @param {Number} trr Top right corner radius | |
* @param {Number} brr Bottom right corner radius | |
* @param {Number} blr Bottom left corner radius | |
* @return {String} Rounded rectangle SVG path data | |
*/ |
Mini projects by Maxime Euzière (xem), subzey, Martin Kleppe (aemkei), Mathieu Henri (p01), Litterallylara, Tommy Hodgins (innovati), Veu(beke), Anders Kaare, Keith Clark, Addy Osmani, bburky, rlauck, cmoreau, maettig, thiemowmde, ilesinge, adlq, solinca, xen_the,...
(For more info and other projects, visit http://xem.github.io)
(Official Slack room: http://jsgolf.club / join us on http://register.jsgolf.club)
/** | |
* @fileOverview Javascript high precision calculate | |
* @author ra <ra@rockagen.com> | |
* @version 0.1 | |
* @see {@link http://usejsdoc.org|jsdoc} | |
* @example | |
* | |
* 0.05 + 0.01 //0.060000000000000005 | |
* 1.0 - 0.42 //0.5800000000000001 | |
* 4.015 * 100 //401.49999999999994 |
var WeakMap = WeakMap || (function (Object) { | |
/*! (C) Andrea Giammarchi - Mit Style License */ | |
var | |
dP = Object.defineProperty, | |
hOP = Object.hasOwnProperty, | |
WeakMapPrototype = WeakMap.prototype, | |
i = 0 | |
; |