Skip to content

Instantly share code, notes, and snippets.

View notpushkin's full-sized avatar
🕊️

Alexander Pushkov notpushkin

🕊️
View GitHub Profile
.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",
/* ==UserStyle==
@name Clean style for Ozon homepage
@namespace [email protected]
@version 1.0.0
@author Alexander Pushkov ([email protected])
==/UserStyle== */
@-moz-document url("https://www.ozon.ru/") {
.container,
[data-widget="paginator"] {
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 / 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 / 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('---------')
#!/bin/bash
# Wrapper for brightnessctl, adding:
# - custom maximum value (useful when you override PWM settings)
# - smooooooooooooooooooooooooooooooooothiness
# - desktop notification
#
# Author: Alexander Pushkov <[email protected]>
# SPDX-License-Identifier: Apache-2.0 OR ISC
DELTA=2
$ flatpak run -vv com.github.suzie97.communique 2>&1 | gawk '{ print strftime("[%Y-%m-%d %H:%M:%S]"), $0 }'
[2021-09-04 18:05:37] F: No installations directory in /etc/flatpak/installations.d. Skipping
[2021-09-04 18:05:37] F: Opening system flatpak installation at path /var/lib/flatpak
[2021-09-04 18:05:37] F: Opening user flatpak installation at path /home/ale/.local/share/flatpak
[2021-09-04 18:05:37] F: Opening user flatpak installation at path /home/ale/.local/share/flatpak
[2021-09-04 18:05:37] F: Opening system flatpak installation at path /var/lib/flatpak
[2021-09-04 18:05:37] F: Opening user flatpak installation at path /home/ale/.local/share/flatpak
[2021-09-04 18:05:37] F: Opening system flatpak installation at path /var/lib/flatpak
[2021-09-04 18:05:37] F: /var/lib/flatpak/runtime/io.elementary.Platform/x86_64/6/f6458cfe79a53d649c33716c75262c1a2027121f0290b529644adee9a809d39e/files/lib32 does not exist
[2021-09-04 18:05:37] F: Cleaning up unused container id 3669369054