Skip to content

Instantly share code, notes, and snippets.

View boskiv's full-sized avatar

Ivan Skiridomov boskiv

  • ZFX
  • Cyprus
  • 07:29 (UTC +03:00)
View GitHub Profile
@boskiv
boskiv / tokens.md
Created December 24, 2022 12:34 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
/*
A single-file JavaScript class to draw candlestick charts.
Use at your own risk.
https://twitter.com/pingpoli
https://pingpoli.de
*/
function pingpoliCandlestick( timestamp , open , close , high , low )
{
this.timestamp = parseInt(timestamp);
this.open = parseFloat(open);
@boskiv
boskiv / exportOptionsAdHoc.plist
Created September 4, 2019 12:30 — forked from cocoaNib/exportOptionsAdHoc.plist
Xcode build with exportOptionsPlist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>ad-hoc</string>
</dict>
</plist>
@boskiv
boskiv / exportOptions.plist
Created September 4, 2019 12:30 — forked from skabber/exportOptions.plist
Export Options Plist Example
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>method</key>
<string>app-store</string>
<key>teamID</key>
<string>XXXXXXXXXX</string>
<key>uploadBitcode</key>
<true/>
@boskiv
boskiv / custom-token.js
Created September 4, 2019 09:41 — forked from pixelastic/custom-token.js
Firebase function to return an Auth0 custom token
import cors from 'cors';
import Promise from 'bluebird';
import axios from 'axios';
import database from '../database/database.js';
/**
* The goal of this function is to mint custom token that can be used to
* authenticate to Firebase.
* The function will be called through https, and will check the credentials of
* the requested user (through the usage of its Auth0 token). If the Auth0 token
@boskiv
boskiv / StreamToString.go
Last active August 14, 2019 13:14 — forked from tejainece/StreamToString.go
Golang: io.Reader stream to string or byte slice
import "bytes"
func StreamToByte(stream io.Reader) []byte {
buf := new(bytes.Buffer)
buf.ReadFrom(stream)
return buf.Bytes()
}
func StreamToString(stream io.Reader) string {
buf := new(bytes.Buffer)
@boskiv
boskiv / log.go
Created August 12, 2019 10:10 — forked from gonzaloserrano/log.go
logrus wrapper
package log
import (
"fmt"
"github.com/Sirupsen/logrus"
"runtime"
"strings"
)
var logger = logrus.New()
@boskiv
boskiv / README.md
Created June 6, 2019 08:56 — forked from zhiguangwang/README.md
Building Unreal Engine Game Client and Dedicated Server on Linux.

Building Unreal Engine Game Client and Dedicated Server on Linux

Because the build tools of UE4 works across platforms (Windows, Mac OS, Linux), steps in this article can be applied to Mac OS and Windows as well.

On Windows, You need to replace RunUAT.sh with RunUAT.bat though.

Prerequisites

First, get Unreal Engine 4 sourcecode and export the following environment variables:

@boskiv
boskiv / minikube-update-hosts.sh
Created February 19, 2019 18:04 — forked from jacobtomlinson/minikube-update-hosts.sh
A script to update your /etc/hosts file from minikube ingest records
#!/bin/bash
#
# A script to update your /etc/hosts file from minikube ingest records
#
# Installation
# ------------
# curl -L https://gist.github.com/jacobtomlinson/4b835d807ebcea73c6c8f602613803d4/raw/minikube-update-hosts.sh > /usr/local/bin/minikube-update-hosts
# chmod +x /usr/local/bin/minikube-update-hosts
INGRESSES=$(kubectl --context=minikube --all-namespaces=true get ingress | grep -v NAMESPACE | awk '{ print $2 }' | tr '\r\n' ' ')
@boskiv
boskiv / kubernetes
Created March 24, 2018 15:29 — forked from pavolloffay/kubernetes
kubernetes, gcloud, minikube
minikube start --vm=kvm
minikube stop
minikube delete
minikube service jaeger-all-in-one
# Google Cloud
gcloud auth application-default login
gcloud auth activate-service-account --key-file client-secret.json
gcloud auth revoke
gcloud projects list