Skip to content

Instantly share code, notes, and snippets.

@artemonsh
artemonsh / tokens.md
Created April 6, 2023 18:10 — 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

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active May 9, 2024 10:55
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@azagniotov
azagniotov / beautiful.rest.api.docs.in.markdown.md
Last active May 9, 2024 10:51
Example to create beautiful REST API docs in Markdown, inspired by Swagger API docs.
@hhypnos
hhypnos / index.html
Created March 7, 2017 18:08
Pure CSS3 Boobs
<div class="body">
<div class="chest">
<div class="left"><div class="clavicle"></div></div>
<div class="right"><div class="clavicle"></div></div>
</div>
<div class="breast">
<div class="left"><ul class="boob"><li class="nipple"></li></ul></div>
<div class="right"><ul class="boob"><li class="nipple"></li></ul></div>
<div class="between"></div>
Настройка Git клиента для идентификации пользователя:
git config --global user.name "Your Name"
git config --global user.email "your@email.address"
git config --global core.editor "your editor"
Инициализация репозитория в текущем каталоге:
git init
Создает репозиторий в указанном каталоге:
git init <directory>
@ThomasLeister
ThomasLeister / rspamd-whitelisting.md
Last active May 9, 2024 10:49
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";

contract api

  • contract address:
{
  sepolia: {
    nftAddress: '0x0000000000000000000000000000000000000000'
  },
  eth: {
 nftAddress: '0x0000000000000000000000000000000000000000'
@OmarMtya
OmarMtya / gist:9ce68c563893d1c774f11a94ea73a31c
Last active May 9, 2024 10:46
Flowbite decorator to fix Angular routing problem
import { initFlowbite } from "flowbite";
import { Subject, concatMap, delay, of } from "rxjs";
let flowbiteQueue = new Subject<any>();
flowbiteQueue.pipe(
concatMap(item => of(item).pipe(delay(100)))
).subscribe((x) => {
x();
})
@bodhi
bodhi / Dockerfile
Created May 22, 2019 00:18
Burn git commit SHA into docker image
FROM golang:1.12 AS build
COPY ./main.go .
# ARG here is to make the sha available for use in -ldflags
ARG GIT_SHA
# -ldflags "-X main.sha=${GIT_SHA}" allows main.sha to be set at build time
RUN go build -ldflags "-X main.sha=${GIT_SHA}" -o /app
FROM scratch
@Braytiner
Braytiner / Windows Defender Exclusions VS 2022.ps1
Last active May 9, 2024 10:41
Adds Windows Defender exclusions for Visual Studio 2022
$userPath = $env:USERPROFILE
$pathExclusions = New-Object System.Collections.ArrayList
$processExclusions = New-Object System.Collections.ArrayList
$pathExclusions.Add('C:\Windows\Microsoft.NET') > $null
$pathExclusions.Add('C:\Windows\assembly') > $null
$pathExclusions.Add($userPath + '\Downloads\HeidiSQL_11.3_64_Portable') > $null
$pathExclusions.Add($userPath + '\.dotnet') > $null