Skip to content

Instantly share code, notes, and snippets.

View FounderDAO's full-sized avatar
🏠
Работаю из дома

Abdulaziz Kholbaev FounderDAO

🏠
Работаю из дома
View GitHub Profile
@FounderDAO
FounderDAO / check-tvc-votes.sh
Created September 28, 2024 09:37 — forked from AshwinSekar/check-tvc-votes.sh
Check the current status of the TVC proposal on mainnet
#!/bin/bash
export LC_NUMERIC="en_US.UTF-8"
RPC_URL="https://api.mainnet-beta.solana.com"
MINT="tvcUX2gkQWsPYK2Uq7DeuX9ZJTFF9V3BGJ2isfLMgrg"
YES_ACCT="5ByopEuFqdd1AvXc6czKu6JQkCXdbWJwFMc4Bxe2dgYQ"
NO_ACCT="AhaUueUXYWEuksQdAJMjvjPGAbjnXhYdk2ZrBVtNA9YT"
ABSTAIN_ACCT="AYHPwv8WSNBKYStSQJ7NfgtWxMPz5WSw3MeDtc2Pww5r"
function fetch_vote_token_balance() {
@FounderDAO
FounderDAO / timestamp_converter.dart
Created January 25, 2023 09:53 — forked from slightfoot/timestamp_converter.dart
Timestamp/DateTime Converter for Cloud Firestore and Dart/Flutter.
// MIT License
//
// Copyright (c) 2020 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@FounderDAO
FounderDAO / django-advcash.py
Created August 28, 2021 11:34 — forked from koriaf/django-advcash.py
Small library to receive advcash.com SCI payments on your website.
class AdvcashProcessor(object):
'''Advcash SCI processing class - accept payments, check checksums and more
Developer documentation:
http://advcash.com/files/documents/sci_russian_2.pdf
Usage:
processor = MyWebsiteAdvcashProcessor(request_data, logger=transactions_logger)
verification_success = processor.validate()
Создание пользователя
---------------------
adduser username
usermod -aG sudo username
group username
su username
---------------------------------------
Компиляции python 3.6
----------------------
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev
@FounderDAO
FounderDAO / 01_complete_authentication_as_api.md
Created January 25, 2020 11:31 — forked from dgilge/01_complete_authentication_as_api.md
How to implement all needed auth endpoints including login with OAuth2 for a SPA using Django REST framework, django-rest-auth and django-allauth

Complete authentication as API including OAuth2 endpoints

I implemented an auth API for a SPA. This is rarely documented and therefore I want to share here how I did it hoping it will be a help for others.

We are still working on it and I'll update this document accordingly.

This tutorial uses following versions:

Package Version
@FounderDAO
FounderDAO / tokens.md
Created December 31, 2019 04:30 — forked from zmts/tokens.md
Про токены, JSON Web Tokens (JWT), аутентификацию и авторизацию. Token-Based Authentication

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

Last major update: 21.10.2019

Основы:

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

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

Например после аутентификации юзер sasha получает право обращатся и получать от ресурса "super.com/vip" некие данные. Во время обращения юзера sasha к ресурсу vip система авторизации проверит имеет ли право юзер обращатся к этому ресурсу (проще говоря переходить по неким разрешенным ссылкам)