Skip to content

Instantly share code, notes, and snippets.

@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
@tuldok89
tuldok89 / cloudflare-ddns-update.sh
Last active November 16, 2019 08:57 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS AAAA record with the IPv6 address of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS AAAA record with the IPv6 address of the source machine
# Used to provide DDNS service and IPv4 connectivity to my IPv6-only network.
# Needs the DNS record pre-creating on Cloudflare
# Proxy - uncomment and provide details if using a proxy
#export https_proxy=http://<proxyuser>:<proxypassword>@<proxyip>:<proxyport>
# Cloudflare zone is the zone which holds the record
@tuldok89
tuldok89 / main.cpp
Last active September 11, 2019 05:09
WIP MP3 Player
#include <Arduino.h>
#include <ESP8266HTTPClient.h>
#include <AudioFileSourceSD.h>
#include <cstring>
#include <EDB.h>
#include "crc32.h"
using namespace std;
#define SD_CS 0
@tuldok89
tuldok89 / bench.txt
Last active April 8, 2019 14:14
Ryzen 1700X Cryptsetup Benchmark
root@PartedMagic:~# cryptsetup benchmark
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1 630912 iterations per second for 256-bit key
PBKDF2-sha256 893165 iterations per second for 256-bit key
PBKDF2-sha512 247773 iterations per second for 256-bit key
PBKDF2-ripemd160 438367 iterations per second for 256-bit key
PBKDF2-whirlpool 220659 iterations per second for 256-bit key
# Algorithm | Key | Encryption | Decryption
aes-cbc 128b 1113.4 MiB/s 3741.1 MiB/s
serpent-cbc 128b 109.6 MiB/s 343.7 MiB/s