Skip to content

Instantly share code, notes, and snippets.

@tuldok89
tuldok89 / compress.bat
Created April 21, 2025 21:06
Compress executables with 7zip-zstd and BCJ2
7z a -t7z vvv2.7z *.exe *.dll -m0=BCJ2 -m1=ZSTD:x22 -m2=ZSTD:x3 -m3=ZSTD:x3 -mb0:1 -mb0s1:2 -mb0s2:3
@tuldok89
tuldok89 / code.js
Created January 23, 2025 08:05
Regex Extractor for Google Sheets
function getField2(str, property) {
const regex = /\{(?:[^{}]|((?:\{[^{}]*\})))*\}/g;
const matches = str.match(regex);
const obj = JSON.parse(matches[0]);
return obj[property];
}
@tuldok89
tuldok89 / [email protected]
Created January 21, 2025 18:12
Systemd Unit to Disable Ethernet Flow Control in Linux
[Unit]
Description=Set ethtool settings for the specified NIC
After=network-online.target
Wants=network-online.target
[Service]
ExecStart=/usr/sbin/ethtool -A %i rx off tx off autoneg off
Type=oneshot
[Install]
@tuldok89
tuldok89 / MD_Parola.h
Last active January 8, 2024 16:42
ESP8266 Clock
#pragma once
#include <MD_Parola.h>
class MD_ParolaExt : public MD_Parola
{
public:
MD_ParolaExt(MD_MAX72XX::moduleType_t mod, SPIClass &spi, uint8_t csPin, uint8_t numDevices = 1);
size_t printExt(struct tm* timeinfo, const char* format = NULL);
virtual ~MD_ParolaExt() = default;
@tuldok89
tuldok89 / bridge.json
Created September 3, 2023 05:17
docker network inspect bridge
[
{
"Name": "bridge",
"Id": "046bf8693a3bd3a5beb344a74fb1468204cdf0e82db7c98b2da86d497e8744a6",
"Created": "2023-09-03T02:07:52.3204914Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
@tuldok89
tuldok89 / kernel-sbsign.sh
Created July 17, 2023 10:17
kernel-sbsign
#!/usr/bin/env bash
kernel="$1"
[[ -n "$kernel" ]] || exit 0
# use already installed kernel if it exists
[[ ! -f "$KERNELDESTINATION" ]] || kernel="$KERNELDESTINATION"
keypairs=(/etc/refind.d/keys/refind_local.key /etc/refind.d/keys/refind_local.crt)
@tuldok89
tuldok89 / core-to-core.txt
Created September 25, 2022 12:45
Output of core-to-core-latency on Windows-on-ARM
Num cores: 8
Num iterations per samples: 5000
Num samples: 300
1) CAS latency on a single shared cache line
0 1 2 3 4 5 6 7
0
1 73±0
2 73±0 73±2
@tuldok89
tuldok89 / shopify.cs
Created November 18, 2019 05:10
Shopify GraphQL
This file has been truncated, but you can view the full file.
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
@tuldok89
tuldok89 / shopify.json
Last active February 6, 2022 08:55
Shopify JSON Schema
This file has been truncated, but you can view the full file.
{
"__schema": {
"queryType": {
"name": "QueryRoot"
},
"mutationType": {
"name": "Mutation"
},
"subscriptionType": null,
"types": [
@tuldok89
tuldok89 / shopify.idl
Created November 18, 2019 05:04
Shopify GraphQL IDL
schema {
query: QueryRoot
mutation: Mutation
}
"""Marks an element of a GraphQL schema as having restricted access."""
directive @accessRestricted(
"""Explains the reason around this restriction"""
reason: String = null
) on FIELD_DEFINITION | OBJECT