Skip to content

Instantly share code, notes, and snippets.

View roman01la's full-sized avatar
🇺🇦

Roman Liutikov roman01la

🇺🇦
View GitHub Profile
@roman01la
roman01la / autochannel.rsc
Last active February 6, 2026 14:43
MikroTik Metal 52 ac: Stable 2.4 GHz Link
/system script add name=auto-channel-boot policy=read,write,test source={
:local iface "wlan1";
:local cand {2412;2437;2462};
:local bestFreq 2437;
:local bestScore 999999;
:global autoChanDone;
:if ([:len $autoChanDone] > 0 && $autoChanDone = true) do={
:log info "[auto-chan] already done, skipping";
:return;
@roman01la
roman01la / auto-channel-after-client.rsc
Created February 6, 2026 11:41
MikroTik Metal 52 ac: Stable 2.4 GHz Link
/system script add name=auto-channel-after-client policy=read,write,test source={
:local iface "wlan1";
:local chans {2412;2437;2462};
:local bestFreq 2437;
:local bestScore 999999;
:global autoChanDone;
:if ([:len $autoChanDone] > 0 && $autoChanDone = true) do={
:log info "[auto-chan] already done, skipping";
:return;
#include "hermes/VM/static_h.h"
#include <stdlib.h>
static uint32_t unit_index;
static inline SHSymbolID *get_symbols(SHUnit *);
static inline SHWritePropertyCacheEntry *get_write_prop_cache(SHUnit *);
static inline SHReadPropertyCacheEntry *get_read_prop_cache(SHUnit *);
static inline SHPrivateNameCacheEntry *get_private_name_cache(SHUnit *);
static const SHSrcLoc s_source_locations[];
static SHNativeFuncInfo s_function_info_table[];
#!/usr/bin/env node
/*
Generate JavaScript stubs for npm dependencies so Cursive can index them
and provide CLJS completions even when node_modules is excluded.
Usage:
node generate-js-stubs.js --output stubs/js --depth 2 --max-props 200 --include-dev false --filter react*,lodash*
*/
const fs = require("fs");
@roman01la
roman01la / decompiled.cljs
Last active April 28, 2025 08:27
OpenAI o3 decompiles JS generated from cljs sources back into ClojureScript code
(ns uix.examples
(:require
;; TanStack Router v1 (CJS bundle brought in by Shadow)
["@tanstack/react-router" :as rr
:refer [Link Outlet RouterProvider]]
;; JS <‑‑> CLJ map/keyword conversion
[cljs-bean.core :refer [->clj]]
;; uix “React‑with‑hiccup” runtime
[uix.core :refer [$ defui strict-mode]]
[uix.dom :as dom]))
(ns uix.ssr
(:require [uix.core :as uix :refer [$ defui]]
#?(:cljs ["react-slider" :as react.slider])
#?(:clj [uix.dom.server :as dom.server])))
#?(:cljs
(defui js-comp* [{:keys [children]}]
(let [[show? set-show] (uix/use-state false)]
(uix/use-effect
#(set-show true)
@roman01la
roman01la / extract_telegram_macos.ipynb
Created May 31, 2024 15:20 — forked from stek29/extract_telegram_macos.ipynb
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
sudo apt install -y iptables hostapd dnsmasq dhcpcd5 isc-dhcp-server python3-pip python3-venv
sudo nano /etc/dhcpcd.conf
interface wlan0
static ip_address=192.168.42.1/24
nohook wpa_supplicant
sudo nano /etc/dhcp/dhcpd.conf
@roman01la
roman01la / blend.py
Created May 15, 2024 11:09
Running Blender on multiple GPUs on Modal.com
from pathlib import Path
from typing import Dict
import modal
import modal.gpu
app = modal.App("blender")
rendering_image = (
modal.Image.debian_slim(python_version="3.11")
.apt_install("xorg", "libxkbcommon0", "ffmpeg")