Skip to content

Instantly share code, notes, and snippets.

View timvisee's full-sized avatar
Consuming coffee

Tim Visée timvisee

Consuming coffee
View GitHub Profile
@rain-1
rain-1 / a_How is a matrix used to count fish?.md
Last active August 1, 2024 14:29
How is a matrix used to count fish?

This is explaining stuff relevant to AOC 2021 day 6

How is a matrix used to count fish?

First lets do fibonacci numbers because it's smaller (2x2 matrix instead of 9x9) and it's familiar ground.

So you can implement fibs like this:

def fib(n):
@BomBardyGamer
BomBardyGamer / dimension_codec.snbt
Created June 10, 2021 10:07
The default dimension codec, as of 1.17, as SNBT
{
"minecraft:dimension_type": {
type: "minecraft:dimension_type",
value: [
{
name: "minecraft:overworld",
id: 0,
element: {
piglin_safe: 0b,
natural: 1b,
@Phate6660
Phate6660 / rust recommendations and alternatives.md
Last active May 29, 2024 12:35
My growing list of Rust programs to use.
@probonopd
probonopd / Wayland.md
Last active October 1, 2024 21:13
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

The Wayland project seems to operate like they were starting a greenfield project, whereas at the same time they try to position Wayland as "the X11 successor", which would clearly require a lot of thought about not breaking, or at least providing a smooth upgrade path for, existing software.

In fact, it is merely an incompatible alternative, and not e

Pipeline Pipeline io_uring Non-pipelined Non-pipelined io_uring
CPU 99 50 (-50%) 97 48 (-50%)
RPS 2,592,670 2,878,222 (+11%) 497,429 631,976 (+26%)
Working set 79 81 79 81
Latency (mean) 1.28 0.98 1.07 1.47
Latency (99th) n/a 7.57 14.8 14.67
@timvisee
timvisee / my-subreddits.txt
Last active September 28, 2024 18:44
My subreddits
11foot8
18650masterrace
1911
2b2t
3Dprinting
3dshacks
3kliksphilip
45thworldproblems
5September2020
9CB9D65
@nstarke
nstarke / netgear-private-key-disclosure.md
Last active April 30, 2024 06:02
Netgear TLS Private Key Disclosure through Device Firmware Images

Netgear Signed TLS Cert Private Key Disclosure

Overview

There are at least two valid, signed TLS certificates that are bundled with publicly available Netgear device firmware.

These certificates are trusted by browsers on all platforms, but will surely be added to revocation lists shortly.

The firmware images that contained these certificates along with their private keys were publicly available for download through Netgear's support website, without authentication; thus anyone in the world could have retrieved these keys.

@roccodev
roccodev / hash.rs
Last active August 29, 2024 12:09
Minecraft SHA-1 complement hash calculation in Rust
// Copyright (C) 2019 RoccoDev
// Licensed under the MIT license.
// <https://opensource.org/licenses/MIT>
// Bench results:
// First hash: 152ms
// Second hash: 1ms
// Third hash: 0ms
extern crate crypto; // Tested with 0.2.36
@Belorum
Belorum / Firefox Send for Windows Command Line.ps1
Created March 14, 2019 09:30
This script will download the command line tool for Firefox Send that was created by Tim Visée and place it directly into your C:\Windows\System32\ folder so that it is accessible via the command line on your system.
<#
Downloads FireFox Send executable made by Tim Visée - https://github.com/timvisee/ffsend/releases
Current Version ffsend v0.2.30 as of 03-14-19
Script made by John Davis @John_Davis - https://github.com/Belorum
#>
Net Session 2>&1 > $null
if ( $? -eq "False" ) {
$Current_Time = Get-Date
@xsot
xsot / instructions.md
Last active March 3, 2024 13:42
sed maze solver

Usage

sed -E -f solver.sed input where input is a file containing the maze.

For best results, resize your terminal to match the height of the maze. To disable animations, delete the lines containing p.

Maze format

The solver assumes the following:

  • The maze only contains the characters # \nSE
  • Every line has the same number of characters
  • There is only one start (S) and end (E)