Skip to content

Instantly share code, notes, and snippets.

View zetxx's full-sized avatar
🕳️

Elin Angelov zetxx

🕳️
View GitHub Profile
version: '3.9'
services:
postgresql:
restart: unless-stopped
container_name: postgresql
hostname: postgresql
image: postgres:alpine
ports:
- '5432:5432'
volumes:
@zetxx
zetxx / containerD&rootless + nerdctl.md
Last active November 20, 2023 07:54
containerD&rootless + nerdctl

containerd(rootless) + nerdctl @Arch linux

install

pacman -Suy containerd nerdctl nerdctl kubectl qemu-user-static rootlesskit slirp4netns buildkit cni-plugins

config

@zetxx
zetxx / adax-loca-init.py
Last active October 4, 2023 09:55
adax-loca-init
# docs https://adax.no/wi-fi/api-development/#local
# registers heater to your wifi network
# install dependencies with: pip install bleak requests
import bleak
import asyncio
import operator
import urllib.parse
wifi_ssid = 'replace with your wifi name' # replace with your wifi name
wifi_psk = 'replace with your wifi psk' # replace with your wifi psk
access_token = '12345678' # generate some strong password for your heater
Computer Information:
Manufacturer: Gigabyte Technology Co., Ltd.
Model: B450 AORUS M
Form Factor: Desktop
No Touch Input Detected
Processor Information:
CPU Vendor: AuthenticAMD
CPU Brand: AMD Ryzen 5 1600 Six-Core Processor
CPU Family: 0x17
// jose version v2.x
const jose = require('jose');
const simpleJWKgen = async({
kty = 'OKP',
crvOrSize = 'Ed25519',
options: {
alg = 'EdDSA',
kid,
key_ops,
use = 'sig'
const key = (k, strLen) => Array
.from({
length: Math.ceil(strLen / k.length)
})
.fill(k)
.join('')
.split('')
.map((v) => v.charCodeAt(0));
const xorStr = (s, {key: {ascii: asciiKey}}) => {

elkjg

elastic

docker run -it -d \
--restart=unless-stopped \
--name=elastic_1 \
--network=metricsandlogging \
-m=2048m \
from typing import Awaitable
import asyncio
import i3ipc
import threading
def pollTitle(c):
# i3.get_tree().find_focused().name
print(c.get_tree().find_focused().window_class)
async def run() -> Awaitable[str]:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
const EventEmitter = require('events');
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
// flattenAPI(data)