Skip to content

Instantly share code, notes, and snippets.

View hnykda's full-sized avatar

Daniel Hnyk hnykda

View GitHub Profile
@hnykda
hnykda / act.html
Created November 25, 2024 13:52
EU Legal Act
This file has been truncated, but you can view the full file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML//EN" "xhtml-strict.dtd">
<!-- saved from url=(0077)https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=OJ:L_202401689#pbl_1 -->
<html xmlns="http://www.w3.org/1999/xhtml" style="height: 100%;"><!-- CONVEX # converter_version:9.16.1 # generated_on:20241017-1316 # ELI version:0.2 --><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="format-detection" content="telephone=no"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1"><meta name="WT.z_usr_lan" content="EN">
<script type="text/javascript" src="./AIAct_files/ruxitagentjs_ICANVfgqrux_10289240325103055.js" data-dtconfig="app=47d4c64c3b67ec69|cuc=m097nmfl|agentId=95b26aaf4599115d|mel=100000|mb=null|featureHash=ICANVfgqrux|dpvc=1|iub=null|lastModification=1732292563811|tp=500,50,0|rdnt=1|uxrgce=1|agentUri=/eurlex-frontoffice/ruxitagentjs_ICANVfgqrux_10289240325103055.js|reportUrl=/eurlex-frontoffice/rb
@hnykda
hnykda / converter.py
Last active August 18, 2024 14:51
Slack to Mattermost Simple Exporter
import json
import os
import argparse
import re
from datetime import datetime
from typing import Dict, List, Any
def load_json(file_path: str) -> Any:
with open(file_path, "r", encoding="utf-8") as f:
@hnykda
hnykda / appscript.gs
Last active August 1, 2024 13:38
docuseal googlesheet public bulk send
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('Submissions')
.addItem('Process Scholarships', 'processScholarshipsMenu')
.addItem('Process Waivers', 'processWaiversMenu')
.addToUi();
}
function processScholarshipsMenu() {
processSubmissions('scholarships');
@hnykda
hnykda / Comp.tsx
Last active February 8, 2024 22:38
"use client";
import React, { useState, useEffect } from "react";
const Comp = ({
existingDataPromise,
moveItemSideEffect,
}: {
existingDataPromise: Promise<string[]>;
moveItemSideEffect: () => void;
}) => {
# How to run it
```
sqlite3 Test.db ".read scripts/init.sql" # creates the dabatase structure
sqlite3 Test.db ".read scripts/seed.sql" # populates with dummy data
sqlite3 Test.db ".read scripts/query1.sql"
sqlite3 Test.db ".read scripts/query2.sql"
```
To run the rules program:
@hnykda
hnykda / main.py
Created April 25, 2023 08:09
generatingDnds
import os
import glob
import argparse
import json
from supabase import create_client, Client
url: str = os.environ.get("NEXT_PUBLIC_SUPABASE_URL")
key: str = os.environ.get("SUPABASE_SERVICE_ROLE_KEY")
supabase: Client = create_client(url, key)
{"device":{"type":"SHRGBW2","mac":"E8DB84807745","hostname":"shellyrgbw2-807745","num_outputs":4, "mode":"white"},"wifi_ap":{"enabled":false,"ssid":"shellyrgbw2-807745","key":""},"wifi_sta":{"enabled":true,"ssid":"artpolis","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"ap_roaming":{"enabled":false,"threshold":-70},"mqtt": {"enable":false,"server":"192.168.33.3:1883","user":"","id":"shellyrgbw2-807745","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"enabled":true,"update_period":15,"peer":""},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":false,"unprotected":false,"username":"admin"},"pin_code":"","name":null,"fw":"20230329-162716/v1.13.0-rc2-g1b3e5af","factory_reset_from_switch":true,"discoverable":false,"build_info":{"build_id":"20230329-162716/v1.13
{"device":{"type":"SHRGBW2","mac":"E8DB84807745","hostname":"shellyrgbw2-807745","num_outputs":4, "mode":"white"},"wifi_ap":{"enabled":false,"ssid":"shellyrgbw2-807745","key":""},"wifi_sta":{"enabled":true,"ssid":"artpolis","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"ap_roaming":{"enabled":false,"threshold":-70},"mqtt": {"enable":false,"server":"192.168.33.3:1883","user":"","id":"shellyrgbw2-807745","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"enabled":true,"update_period":15,"peer":""},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":false,"unprotected":false,"username":"admin"},"pin_code":"","name":null,"fw":"20221027-100516/v1.12.1-ga9117d3","factory_reset_from_switch":true,"discoverable":false,"build_info":{"build_id":"20221027-100516/v1.12.1-g
{"device":{"type":"SHRGBW2","mac":"E8DB84807745","hostname":"shellyrgbw2-807745","num_outputs":4},"wifi_ap":{"enabled":false,"ssid":"shellyrgbw2-807745","key":""},"wifi_sta":{"enabled":true,"ssid":"artpolis","ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"wifi_sta1":{"enabled":false,"ssid":null,"ipv4_method":"dhcp","ip":null,"gw":null,"mask":null,"dns":null},"ap_roaming":{"enabled":false,"threshold":-70},"mqtt": {"enable":false,"server":"192.168.33.3:1883","user":"","id":"shellyrgbw2-807745","reconnect_timeout_max":60.000000,"reconnect_timeout_min":2.000000,"clean_session":true,"keep_alive":60,"max_qos":0,"retain":false,"update_period":30},"coiot": {"enabled":true,"update_period":15,"peer":""},"sntp":{"server":"time.google.com","enabled":true},"login":{"enabled":false,"unprotected":false,"username":"admin"},"pin_code":"","name":null,"fw":"20220209-094013/v1.11.8-g8c7bb8d","factory_reset_from_switch":true,"discoverable":false,"build_info":{"build_id":"20220209-094013/v1.11.8-g8c7bb8d","build_
substitutions:
device_name: bottommirror
esphome:
name: ${device_name}
platform: ESP8266
board: esp01_1m
logger:
api: