Last major update: 25.08.2020
- Что такое авторизация/аутентификация
- Где хранить токены
- Как ставить куки ?
- Процесс логина
- Процесс рефреш токенов
- Кража токенов/Механизм контроля токенов
<?php | |
/** | |
* php-ansi-color | |
* | |
* Original | |
* https://github.com/loopj/commonjs-ansi-color | |
* | |
* @code | |
* <?php | |
* require_once "ansi-color.php"; |
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
<?php | |
use Faker\Factory as Faker; | |
class ApiTester extends TestCase { | |
/** | |
* @var Faker | |
*/ | |
protected $fake; |
<?php | |
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/ | |
/* | |
The MIT License (MIT) | |
Copyright (c) 2015 | |
Permission is hereby granted, free of charge, to any person obtaining a copy |
# Mixings from: | |
# https://www.clayharmon.com/words/posts/enabling-gzip-compression-on-ec2 | |
# http://www.samaxes.com/2008/04/htaccess-gzip-and-cache-your-site-for-faster-loading-and-bandwidth-saving/ | |
# http://www.tonmoygoswami.com/2013/05/how-to-enable-gzip-on-amazon-elastic.html | |
# ------------------------------------------------------------------------------ | |
# | Compression | | |
# ------------------------------------------------------------------------------ | |
<IfModule mod_deflate.c> |
// Implementation in ES6 | |
function pagination(c, m) { | |
var current = c, | |
last = m, | |
delta = 2, | |
left = current - delta, | |
right = current + delta + 1, | |
range = [], | |
rangeWithDots = [], | |
l; |
# Backup DB | |
docker run \ | |
--rm \ | |
--link running_mongo:mongo \ | |
-v /data/mongo/backup:/backup \ | |
mongo \ | |
bash -c ‘mongodump --out /backup --host $MONGO_PORT_27017_TCP_ADDR’ | |
# Download the dump | |
scp -r USER@REMOTE:/data/mongo/backup ./backup | |
CSS on its own can be fun, but stylesheets are getting larger, more complex, and harder to maintain. This is where a preprocessor can help. Sass lets you use features that don't exist in CSS yet like variables, nesting, mixins, inheritance and other nifty goodies that make writing CSS fun again.
that's from the Sass website, while I agree that may have been true 10 years ago, CSS has come a long way since then :) i think most of Sass's features (as listed here) are all things CSS3 has since taken care of. so, without further ado, my case:
SCSS (example from their website)