Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
[user]
# name = Alexander Pushkov
# email = alexander@notpushk.in
[alias]
st = status
last = log -1 HEAD
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
lgd = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset'
.tabbrowser-tab {
--tab-corner-rounding: 30px;
--toolbar-color: transparent;
overflow: visible !important;
}
/* Fix left curve display on first tab */
#tabbrowser-arrowscrollbox:not([overflowing="true"]) .titlebar-spacer {
margin-inline-end: -15px;
#!/bin/bash
# 2022 Alexander Pushkov, licensed ISC
# Usage: gptman curl in humorous style
set -e
OPENAI_API_KEY='...'
mandir="$(mktemp -d gptman.XXXXXX)"
trap "rm -rf ${mandir}" EXIT HUP INT QUIT TERM
man="${mandir}/page"
#!/bin/bash
# WTFPL
tsp=(/opt/homebrew/bin/tailscale --socket ~/.tailscaled.socket)
jq() {
/opt/homebrew/bin/jq "$@"
}
status_json="$("${tsp[@]}" status --json)"
<script lang="ts">
import ApexCharts from "apexcharts";
let chartCpu: HTMLDivElement | null;
$: if (chartCpu) {
new ApexCharts(chartCpu, {
// styling
chart: {
type: "area",
@-moz-document url("https://www.ozon.ru/") {
.container,
[data-widget="paginator"] {
display: none;
}
#stickyHeader {
flex-direction: column;
gap: 3em;
margin-block: 3em;
from wemake_python_styleguide.violations import system, naming, complexity, consistency, best_practices, refactoring, oop
REDIR_TEMPLATE = "/{full_code} https://wemake-python-styleguide.readthedocs.io/en/latest/pages/usage/violations/{group_name}.html#{full_group_name}.{name}"
violation_groups = {
"system": system,
"naming": naming,
"complexity": complexity,
"consistency": consistency,
@notpushkin
notpushkin / tic_tac_toe.py
Last active June 22, 2022 05:37
A tic-tac-toe game, (almost) implemented by GitHub Copilot
# Prompt:
"""A tic-tac-toe game."""
# Everything down below is autocompleted:
def print_board(board):
"""Prints the board."""
print(board[0] + ' | ' + board[1] + ' | ' + board[2])
print('---------')
?: your client unchoked the peer but the peer is not interested
D: currently downloading from the peer (interested and not choked)
d: your client wants to download, but peer doesn't want to send (interested and choked)
E: peer is using Protocol Encryption (all traffic)
e: peer is using Protocol Encryption (handshake)
F: peer was involved in a hashfailed piece (not necessarily a bad peer, just involved)
H: peer was obtained through DHT
h: peer connection established via UDP hole-punching
I: peer established an incoming connection
K: peer unchoked your client, but your client is not interested
@notpushkin
notpushkin / soundcloud-dl.md
Last active April 3, 2022 17:47
Manual SoundCloud track download
  1. Prepend https://api.soundcloud.com/resolve?client_id=8bcccc3476eaa137a084c9f0c041915f&url= to your track url
  2. You'll be redirected to track's API page, append /stream before ?client_id

For a more humane experience, try youtube-dl.

Powered by SoundCloud