Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
Draziw.Button.Mines
ag.video_solutions.wedotv
ahf.dummynation
ai.socialapps.speakmaster
air.com.beachbumgammon
air.com.freshplanet.games.SongPop2
air.com.gamesys.mobile.slots.jpj
air.com.goodgamestudios.empirefourkingdoms
air.com.kitchenscramble.goo
air.com.lalaplay.rummy45
#!/usr/bin/env bash
# Abort sign off on any error
set -e
# Start the benchmark timer
SECONDS=0
# Repository introspection
OWNER=$(gh repo view --json owner --jq .owner.login)
@wyfo
wyfo / asyncio-select.py
Last active October 22, 2024 16:12
Python asyncio select implementation
import asyncio
import collections.abc
import inspect
import random
import typing
@typing.overload
def select[T](
awaitables: collections.abc.Sequence[collections.abc.Awaitable[T]],
@oguzalb
oguzalb / arrowfunc.patch
Created July 21, 2023 14:08
adding arrow functions to Python grammar
diff --git a/Grammar/Tokens b/Grammar/Tokens
index 618ae81..29bcfeb 100644
--- a/Grammar/Tokens
+++ b/Grammar/Tokens
@@ -11,6 +11,7 @@ RPAR ')'
LSQB '['
RSQB ']'
COLON ':'
+FUNC_SIGN '=>'
COMMA ','
@NeverBehave
NeverBehave / port-forwarding.py
Last active February 26, 2024 15:39 — forked from WangYihang/port-forwarding.py
Access devices with IPv6 Link-local address --- port forwarding via python socket
#!/usr/bin/env python3
# Tcp Port Forwarding (Reverse Proxy)
#
# For link-local IPv6 address, such as router emergency recovery, etc.
# Workaround for https://stackoverflow.com/questions/45299648/how-to-access-devices-with-ipv6-link-local-address-from-browserlike-ie-firefox
#
# Usage: python3 forward.py --listen-host 127.0.0.1 --listen-port 8443 --connect-host 'fe80::abcd:abcd:beef:beef%enp0s0' --connect-port 443
import socket
import threading
@stormwild
stormwild / git-partial-shallow-clone.md
Last active August 4, 2023 15:57
Git Partial and Shallow Clone

Git

Partial and Shallow Clone

Get up to speed with partial clone and shallow clone

There are many different types of clones beyond the default full clone. If you truly need to have a distributed workflow and want all of the data in your local repository, then you should continue using full clones. If you are a developer focused on a single repository and your repository is reasonably-sized, the best approach is to do a full clone.

You might switch to a blobless partial clone if your repository is very large due to many large blobs, as that clone will help you get started more quickly. The trade-off is that some commands such as git checkout or git blame will require downloading new blob data when necessary.

@phoe
phoe / forever.md
Last active February 22, 2024 23:50
Forever Stable Branch

Forever Stable Branch

Stable branch, I can see you in the stable branch
See you again, I see you again
In my dreams, in my dreams, in my dreams, in my dreams

Morning light, I remember the morning li-i-i-i-ight
Outside my door (outside my door), I'll see you no more (see you no more)
In my dreams, in my dreams, in my dreams, in my dreams
>

@webknjaz
webknjaz / wifi-6-mesh.md
Last active January 13, 2025 17:37
My research on building a well-covered high-speed network for the future new house with focus on effortless Wi-Fi client roaming with 802.11ax (tri-band WiFi 6E with 8x8 MU-MIMO capabilities), 3 APs, 802.11r, 802.11k, 802.11v, 802.11s, 802.11w and 10GB-compatible CAT6 Ethernet backchannel

💭 Thoughts

I want to have:

  • 3 APs that would approximately evenly cover:
    • ground floor
    • second floor
    • garage space
    • bonus: reach some of the backyard/garden
  • Multipath connections between the APs
  • Bonded channels between the APs and the managed network switches (LACP 1+1 = 2Gbps)
@webknjaz
webknjaz / predictable-build-constraints.md
Last active November 28, 2021 08:17
A few thoughts on enabling reproducible builds with PEP 517

Huh?

I've got an idea to fill the void of the non-existent PEP 517 build requirements provisioning. The problem is that currently there's no first-class citizen support for reproducible builds in the PEP 517 world. People usually set lower bounds on their build backend of choice and that's about it. Even if some will set exact pins in their pyproject.toml, it's not enough because those entries may contain unpinned (transitive) dependencies. One way to do this with python -m build is to set PIP_CONSTRAINTS environment variable (I haven't actually tested this yet but I expect it to work).

That workaround is suboptimal and leaves the users with no answer on how to manage the invocations and the

@Gowee
Gowee / uacme-cloudflare-hook.sh
Last active November 16, 2024 05:20
DNS-01 challenge hook script of uacme for Cloudflare
#!/bin/sh
# Copyright (C) 2020 Michel Stam <[email protected]>
# Copyright (C) 2021 Hung-I Wang <[email protected]>
#
# The script is adatped from:
# https://github.com/ndilieto/uacme/blob/5edec0eea1bcf6f454ec1787297c2408c2f2e97a/nsupdate.sh
#
# Licensed under the the GNU General Public License <http://www.gnu.org/licenses/>.
# The script is meant to be used as a hook script of uacme to update TXT records for acme challenges.