Skip to content

Instantly share code, notes, and snippets.

View andrsj's full-sized avatar
👁️‍🗨️

Andrii.go andrsj

👁️‍🗨️
View GitHub Profile
@mymmrac
mymmrac / main.go
Created February 19, 2024 10:34
Go Mods [Ebiten + WASI]
package main
import (
"context"
_ "embed"
"fmt"
"image/color"
"os"
"os/signal"
"sync"
@hansrajdas
hansrajdas / vim.md
Last active June 19, 2024 22:27
VIM commands

Acronym

  • C-a ==> CTRL-a

Modes in VIM

  • Normal mode(n) When we open mode, the default mode is normal
  • Insert mode(i) When we want to insert some text, we press i, a or A etc to go in insert mode
  • Command mode(c) When we type colon(:) from normal mode, we enters command mode
  • Visual mode(v) Using v or V or C-i

Start VIM

@zmts
zmts / tokens.md
Last active June 25, 2024 12:25
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 25.08.2020

  • Что такое авторизация/аутентификация
  • Где хранить токены
  • Как ставить куки ?
  • Процесс логина
  • Процесс рефреш токенов
  • Кража токенов/Механизм контроля токенов
@ronreiter
ronreiter / sqlalchemy_example.py
Created August 10, 2015 06:21
SQLAlchemy Example
from sqlalchemy import Column, Integer, String, ForeignKey, create_engine
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship, backref, sessionmaker, joinedload
# For this example we will use an in-memory sqlite DB.
# Let's also configure it to echo everything it does to the screen.
engine = create_engine('sqlite:///:memory:', echo=True)
# The base class which our objects will be defined on.
Base = declarative_base()