Skip to content

Instantly share code, notes, and snippets.

View davidroman0O's full-sized avatar
🏠
Working from home

David Roman davidroman0O

🏠
Working from home
View GitHub Profile
@davidroman0O
davidroman0O / script.js
Created September 26, 2024 22:26
Anthropic Claude AI - Remove all knowledge
// I was so tired of clicking
const uls = document.querySelectorAll('ul');
uls.forEach(ul => {
const buttons = ul.querySelectorAll('button[aria-label="Remove from project knowledge"]');
buttons.forEach(button => button.click());
});
@usrbinkat
usrbinkat / README.md
Last active November 16, 2024 22:08
TuringPi2 RK1 Build Journal

Turing Pi 2 + 4x RK1 32GB Kubevirt Cluster

In this gist we will attempt to capture the prominent steps in building an RK1 TPI2 Talos K8s Cluster for use with the github.com/ContainerCraft/Kargo kubevirt platform.

Info

If you try this and achieve success imaging your RK1 compute modules with the un-merged talos rk1 fork please report your success on this rfe issue: github.com/siderolabs/talos/issues/8187

Update Turing Pi 2 BMC Firmware

@davidroman0O
davidroman0O / readme.md
Last active November 22, 2023 13:07
Delete all "Watch later" videos

It's semi-automated at worse, automated at best

open browser

open inspector on console

copy paste, enter

wait

Notes on Modern UI Development: Taking Ideas from Spaced Repetition

Introduction

I have been working on a modern typing training application for the last couple of days. One of the main motivations was to build an app with a modern UI and minimal distractions, enabling to fully focus on the training aspect. You can read more about the original idea and thought process here as well as some notes on iterating over the details here.

After adding some minimal auto close functionalities for the code training section, you can read about it here, another important feature was to make the text training part more entertaining.

@reednj
reednj / mult.md
Last active September 25, 2022 06:23

Multiplication from Scratch

Imagine you need to implement (integer) mulitplication in code. Maybe you are on a system which doesn't have it or something. How to do this, and what is the minimal set of operators that are required?

Repeated addition

The most obvious way to do multiplition is through repeated addition. To get the answer to 56 x 67 you add 56 to itself 67 times (or 67, 56 times - the order doesn't matter).

This is simple to implement if we assume for the moment that both a and b are positive (we will deal with negative integers later)

@ityonemo
ityonemo / Packed tagged.zig
Created August 12, 2022 18:15
Packed tagged union in zig
const E = enum(u12) {
Int = 0xFFF,
String = 0xFFE,
Pointer = 0xFFD,
}
const P = packed union(?e){
const this = @This();
Int: packed struct {
@aldy505
aldy505 / exec.sh
Created July 10, 2022 01:31
Spin up clustered rqlite on 1 host
rqlited \
-auth rqlite.json \
-fk \
-node-id 1 \
-http-addr localhost:4001 \
-raft-addr localhost:4002 \
./node.1
rqlited \
-auth rqlite.json \
@DanB91
DanB91 / README.txt
Last active November 28, 2022 04:57
Playdate Zig starting point
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate:
https://github.com/DanB91/Zig-Playdate-Template
The rest of this is preservied for historical reasons:
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform.
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware.