Skip to content

Instantly share code, notes, and snippets.

View prostomarkeloff's full-sized avatar
🎯
Focusing

prostomarkeloff prostomarkeloff

🎯
Focusing
View GitHub Profile
@andrewrk
andrewrk / async-threads-example.zig
Last active March 23, 2020 18:42
using async/await manually with threads
const std = @import("std");
var all_threads: [10]*std.Thread = undefined;
var next_thread_index: usize = 0;
pub fn main() anyerror!void {
_ = async asyncMain();
var i: usize = 0;
while (i < next_thread_index) : (i += 1) {
all_threads[i].wait();
@dmontagu
dmontagu / fastapi_cbv.py
Last active July 17, 2024 04:08
FastAPI CBV
import inspect
from typing import Any, Callable, List, Type, TypeVar, Union, get_type_hints
from fastapi import APIRouter, Depends
from pydantic.typing import is_classvar
from starlette.routing import Route, WebSocketRoute
T = TypeVar("T")
CBV_CLASS_KEY = "__cbv_class__"
@limitedeternity
limitedeternity / m.vk.audio.js
Last active October 31, 2023 20:17
Delete VK audio from profile
new Promise(resolve => {
var offset = -100;
let pageScroll = () => {
window.scrollBy(0, 50);
if (window.pageYOffset === offset) {
return resolve(true);
}
offset = window.pageYOffset;
setTimeout(pageScroll, 50);
@krnd
krnd / .flake8
Last active June 22, 2024 04:57
python-flake8
# .flake8
#
# AUTHOR
# krnd
#
# VERSION
# 1.4
#
# SEE ALSO
# http://flake8.pycqa.org/en/latest/user/options.html
@molotovbliss
molotovbliss / terminalrc
Created December 14, 2017 08:41
Dracula Theme for XFCE4 Terminal
ColorBackground=#28282a2a3636
ColorForeground=#f8f8f8f8f2f2
ColorSelection=#363639394848
ColorBold=#f4f47676c3c3
ColorCursor=#5050fafa7b7b
TabActivityColor=#5050fafa7b7b
ColorPalette=#000000000000;#9a9a40404646;#90907979b3b3;#929298986363;#3d3d98985a5a;#9a9a53538282;#3a3a4d4d5b5b;#8bfc8bfc8ccc;#4d4d4d4d4d4d;#ffff55555555;#cacaa9a9fafa;#f1f1fafa8c8c;#5050fafa7b7b;#ffff7979c6c6;#8b8be9e9fdfd;#f8f8f8f8f2f2
ColorSelectionUseDefault=FALSE
ColorBoldUseDefault=FALSE
@divs1210
divs1210 / SLIP.py
Last active May 24, 2023 23:14
helps escape the Python's clutch
import types
# Helpers
# =======
def _obj():
'''Dummy object'''
return lambda: None
_FILLER = _obj()
@pylover
pylover / inspections.txt
Last active April 22, 2024 07:47 — forked from ar45/inspections.txt
PyCharm inspections
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |'
# noinspection PyPep8
# noinspection PyPep8Naming
# noinspection PyTypeChecker
# noinspection PyAbstractClass
# noinspection PyArgumentEqualDefault
# noinspection PyArgumentList
# noinspection PyAssignmentToLoopOrWithParameter
# noinspection PyAttributeOutsideInit
@parmentf
parmentf / GitCommitEmoji.md
Last active July 23, 2024 11:27
Git Commit message Emoji