Skip to content

Instantly share code, notes, and snippets.

View misterion's full-sized avatar
🎩
with brim a hat to cover your face in moments of anger

Nick Bondarenko misterion

🎩
with brim a hat to cover your face in moments of anger
View GitHub Profile
@misterion
misterion / protocol_one_cla.txt
Created December 13, 2019 12:58
Protocol_One_CLA
### Protocol One Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Protocol One
or its affiliates. This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code,
object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information
or other works of authorship that you submit or have submitted, in any form and in any manner, to Protocol One in respect
of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact
opensource@protocol.one.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses
@misterion
misterion / SAP_CLA
Created December 11, 2019 08:49 — forked from CLAassistant/SAP_CLA
SAP Individual Contributor License Agreement
### SAP Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by SAP SE or its affiliates (“SAP”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to SAP in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@sap.com.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to SAP a non-exclusive, perpetual, irrevocable, worldwi
@misterion
misterion / tokens.md
Created October 9, 2018 13:04 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

Preconditions:

В данной заметке рассматривается работа JWT с симметичным алгоритмом шифрования (HS256/HS384/HS512)

Основы:

Аутентификация(authentication, от греч. αὐθεντικός [authentikos] – реальный, подлинный; от αὐθέντης [authentes] – автор) - это процесс проверки учётных данных пользователя (логин/пароль). Проверка подлинности пользователя путём сравнения введённого им логина/пароля с логином/паролем, сохранённым в базе данных пользователей.

Авторизация(authorization — разрешение, уполномочивание) - это проверка прав пользователя на доступ к определенным ресурсам.

@misterion
misterion / gist:b8f3731dd635017044c91ae34410164d
Created November 10, 2016 16:09
Selectel private cloud backup script
#!/bin/bash
export OS_AUTH_URL="https://api.selvpc.ru/identity/v3"
export OS_IDENTITY_API_VERSION="3"
export OS_VOLUME_API_VERSION="2"
export OS_PROJECT_DOMAIN_NAME='PUT YOUR DATA HERE'
export OS_PROJECT_ID='PUT YOUR DATA HERE'
export OS_TENANT_ID='PUT YOUR DATA HERE'
export OS_REGION_NAME='ru-1'
@misterion
misterion / output.txt
Created January 4, 2016 11:10
Gist from "Under the Hood of Redis: Hash [Part 2] & List"
config set hash-max-ziplist-entries 1
+OK
config set hash-max-ziplist-value 1000000
+OK
flushall
+OK
info memory
$225
# Memory
used_memory:508536
@misterion
misterion / gist:c0cb0d12fc5d246740e1
Created December 16, 2015 11:08
Treetds query test
<?php
$ip = '192.168.1.17';
$port = 5000;
$dbname = 'users';
$user = 'sa';
$password = 'sa';
$totalCount = 1000;
@misterion
misterion / gist:85c5d6cb32e4ddd487ce
Created December 16, 2015 10:59
Test freetds connection speed
<?php
$ip = '192.168.1.17';
$port = 5000;
$dbname = 'users';
$user = 'sa';
$password = 'sa';
$totalCount = 1000;
<?php
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL | E_STRICT);
ini_set('max_execution_time', 0);
ini_set('memory_limit', '3072M');
$hashWrite = /** @lang Lua */ <<<LUA
for i = 0, ARGV[1], 1 do
redis.call('hset', 'test', i, i);
end