Skip to content

Instantly share code, notes, and snippets.

View crusat's full-sized avatar

Kuznetsov Aleksey crusat

View GitHub Profile
@kataev
kataev / docs.txt
Created March 18, 2021 17:02
Ссылки к докладу "Почему вам не нужен асинхронный ORM" Денис Катаев PyCon Weekend 2021
1. Юрий Селиванов, EdgeDB, Asyncio «Asyncio сегодня и завтра» - https://www.youtube.com/watch?v=3rSAtD2gKQE
2. CancellError - https://youtu.be/ehMcXF1GGyA?list=PL_blwmWQZXPL0YRH5xDPrOtYJ4qiU2ASb&t=1617
3. CancellError 3.8 - https://bugs.python.org/issue32528
4. What Color is Your Function? - https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function/
5. Перевод статьи выше - https://habr.com/ru/post/466337/
6. Отказ httpx от двух интерфейсов - github.com/encode/httpx/issues/572 и github.com/encode/httpx/issues/587
7. Закон Литтла - https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%BA%D0%BE%D0%BD_%D0%9B%D0%B8%D1%82%D1%82%D0%BB%D0%B0
8. Async Python is not faster - http://calpaterson.com/async-python-is-not-faster.html
9. I'm not feeling the async pressure - https://lucumr.pocoo.org/2020/1/1/async-pressure/
10. Денис Катаев, Tinkoff.ru «SQLAlchemy: Python vs Raw SQL» - https://youtu.be/jUGK-CtM-Mk
@takoikatakotako
takoikatakotako / ContentView.swift
Created July 3, 2020 23:26
SwiftUIでよくあるチュートリアル画面を作る
import SwiftUI
struct ContentView: View {
@State var views = [
TutorialView(imageName: "snorlax", text: "First"),
TutorialView(imageName: "pikachu", text: "Second"),
TutorialView(imageName: "slowpoke", text: "Third"),
TutorialView(imageName: "coil", text: "Fourth"),
]
@koolay
koolay / rsa.py
Last active July 3, 2020 14:56
rsa.python
import base64
import io
from Crypto import Random
from Crypto.Hash import SHA
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_OAEP as PKCS1_OAEP_Cipher
def gen_key_pair(passpharse=None):
"""
@johnfmorton
johnfmorton / TransmitOpenTerminal.txt
Last active February 16, 2025 05:13
Use Transmit 5 to open in iTerm (instead of Terminal.app) as mentioned here https://library.panic.com/transmit5/open-in-terminal/
on openTerminal(location, remoteHost, serverPort)
tell application "System Events"
-- some versions might identify as "iTerm2" instead of "iTerm"
set isRunning to (exists (processes where name is "iTerm")) or (exists (processes where name is "iTerm2"))
end tell
tell application "iTerm"
activate
set targetTab to ""
@Kartones
Kartones / postgres-cheatsheet.md
Last active September 11, 2025 15:48
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@lxneng
lxneng / gist:741932
Created December 15, 2010 13:21
install PostgreSQL 9 in Mac OSX via Homebrew
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql