Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
/* ==UserStyle==
@name Clean style for Ozon homepage
@namespace ozon-sanity@ale.sh
@version 1.0.0
@author Alexander Pushkov (hey@ale.sh)
==/UserStyle== */
@-moz-document url("https://www.ozon.ru/") {
.container,
[data-widget="paginator"] {
/* ==UserStyle==
@name WaniKani spacier reviews
@namespace wanikani-spacier-reviews@ale.sh
@version 1.0.0
@author Alexander Pushkov (hey@ale.sh)
==/UserStyle== */
@-moz-document domain("wanikani.com") {
:root {
--color-quiz-srs-correct-background: var(--color-quiz-correct-background);
@notpushkin
notpushkin / zheses.json
Created September 19, 2017 18:37
Какой ЖЭС обслуживает ваш дом в Минске
{
"1": [],
"2": [],
"3": [
"ул. Азгура - 1",
"ул. Азгура - 1а",
"ул. Азгура - 1б",
"ул. Азгура - 3",
"ул. Азгура - 5",
"ул. Андреевская - 7/2",
@notpushkin
notpushkin / .gitlab-ci.yml
Last active March 19, 2024 10:06
Using GitLab Pages as an APT repo
# You can use this config to deploy a really simple APT repo on GitLab Pages.
#
# Usage:
# 1. Add this file and some *.debs into a repo root
# 2. (optional) Add some index.html stuff into public/
# 3. Generate a GnuPG keypair w/o a passphrase:
# export GNUPGHOME="$(mktemp -d)"
# gpg --gen-key
# # type in key name/email and leave passphrase empty
# gpg --export-secret-key --armor | head -n-1 | tail -n+2 | tr -d '\n' | xclip -sel clip
@notpushkin
notpushkin / outline-keygen.sh
Last active January 18, 2024 11:32
Outline VPN server stack adapted for use with Lunni / Docker Swarm
#!/bin/bash
set -euo pipefail
fb="$(tput bold)"
fn="$(tput sgr0)"
log() {
echo "$1" > /dev/stderr
}
@notpushkin
notpushkin / pomflify.py
Last active December 29, 2023 07:11
Use Netlify as a personal pomf / dropbox
#!/usr/bin/env python3
"""
Usage:
pomflify.py inputfile [filename for url]
pomflify.py '~/Music/Empty streets.flac' "$(pwgen 6 1).flac"
Author: Alexander Pushkov <alexander@notpushk.in>
License: ISC (https://opensource.org/licenses/ISC)
"""
import os
@notpushkin
notpushkin / dman.sh
Last active December 26, 2023 11:55
dman on macOS – read man pages from manpages.debian.org
#!/bin/sh
set -e
# dman - read man pages from manpages.debian.org
# Patched for macOS by Alexander Pushkov <alexander@notpushk.in>
###############################################################################
# Copyright (C) 2008 Canonical Ltd.
#
# This code was originally written by Dustin Kirkland <kirkland@ubuntu.com>,

Do not use apt-key add.

apt-key add [filename]

Note: Instead of using this command a keyring should be placed directly in the /etc/apt/trusted.gpg.d/ directory with a descriptive name and either "gpg" or "asc" as file extension.
    — apt-key(8) manpage

@notpushkin
notpushkin / iceobs.sh
Last active October 22, 2023 12:48
A script for streaming from OBS Studio (https://obsproject.com/) to Icecast2
ICE_HOST="example.net"
ICE_PORT="8000"
ICE_PASS="hackme"
ICE_MOUNT="/obs.ogg"
FILE="/tmp/iceobs.ogg.sock"
# Requirements: obs oggfwd
rm -f $FILE
mkfifo $FILE
from fastapi import FastAPI, Depends
from contextlib import asynccontextmanager, contextmanager
app = FastAPI()
@contextmanager
def get_answer():
yield 42