Skip to content

Instantly share code, notes, and snippets.

@olvap80
olvap80 / grub.md
Created July 1, 2025 15:09 — forked from jfeilbach/grub.md
Make Linux fast

In /etc/default/grub, modify:

noibrs noibpb nopti nospectre_v2 nospectre_v1 l1tf=off nospec_store_bypass_disable no_stf_barrier mds=off tsx=on tsx_async_abort=off mitigations=off 

Then sudo update-grub

from https:// make-linux-fast-again.com/ This domain does not seem to be maintained any longer.

@olvap80
olvap80 / bash_strict_mode.md
Created May 11, 2025 16:55 — forked from mohanpedala/bash_strict_mode.md
set -e, -u, -o, -x pipefail explanation
@olvap80
olvap80 / fork-is-evil-vfork-is-good-afork-would-be-better.md
Created May 6, 2025 20:01 — forked from nicowilliams/fork-is-evil-vfork-is-good-afork-would-be-better.md
fork() is evil; vfork() is goodness; afork() would be better; clone() is stupid

I recently happened upon a very interesting implementation of popen() (different API, same idea) called popen-noshell using clone(2), and so I opened an issue requesting use of vfork(2) or posix_spawn() for portability. It turns out that on Linux there's an important advantage to using clone(2). I think I should capture the things I wrote there in a better place. A gist, a blog, whatever.

This is not a paper. I assume reader familiarity with fork() in particular and Unix in general, though, of course, I link to relevant wiki pages, so if the unfamiliar reader is willing to go down the rabbit hole, they should be able to come ou

@olvap80
olvap80 / nil_check_working.go
Created March 30, 2025 15:52 — forked from mangatmodi/nil_check_working.go
nil_check_working.go
package main
import (
"fmt"
"reflect"
)
type Animal interface {
MakeSound() string
}
@olvap80
olvap80 / ANSI.md
Created January 18, 2025 19:41 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@olvap80
olvap80 / ANSI.md
Created January 18, 2025 19:41 — forked from fnky/ANSI.md
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@olvap80
olvap80 / ANSI-escape-sequences.md
Created January 18, 2025 19:00 — forked from ConnerWill/ANSI-escape-sequences.md
ANSI Escape Sequences cheatsheet

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@olvap80
olvap80 / ComPort over Network.md
Created March 16, 2021 12:27 — forked from DraTeots/ComPort over Network.md
ComPort over Network