Skip to content

Instantly share code, notes, and snippets.

View uncomfyhalomacro's full-sized avatar
🇵🇭
Manifesting 🌠

Soc Virnyl S. Estela uncomfyhalomacro

🇵🇭
Manifesting 🌠
View GitHub Profile
@uncomfyhalomacro
uncomfyhalomacro / Wayland.md
Created November 2, 2023 23:31 — forked from probonopd/Wayland.md
Boycott Wayland. It breaks everything!

Wayland actually is the future!

PS: probonopd is a crybaby who won't maintain x11.

@uncomfyhalomacro
uncomfyhalomacro / mermaid.html
Created July 28, 2023 13:38 — forked from mtolk/mermaid.html
This gist was created to anwser a question about using mermaidjs in the zola static site generator: https://zola.discourse.group/t/mermaid-integration/573?u=marco
<!-- should be in templates/ -->
<html>
<head>
<style>
div.mermaid {
width:25%;
}
</style>
</head>
<body>
@uncomfyhalomacro
uncomfyhalomacro / latency.txt
Created February 13, 2023 04:37 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@uncomfyhalomacro
uncomfyhalomacro / tree_sitter_guide.md
Created December 16, 2022 10:22 — forked from Aerijo/tree_sitter_guide.md
Guide to writing your first Tree-sitter grammar

Guide to your first Tree-sitter grammar

NOTE: The Tree-sitter API and documentation has changed and improved since this guide was created. I can't guarantee this is up to date.

About

Tree-sitter is the new way Atom is providing language recognition features, such as syntax highlighting, code folding, autocomplete, and more. In contrast to TextMate grammars, which work by regex matching, Tree-sitter will generate an entire syntax tree. But more on that can be found in it's own docs.

Here, we look at making one from scratch.

@uncomfyhalomacro
uncomfyhalomacro / nuc7refusestoboot.md
Created April 11, 2022 09:37 — forked from starlinq/nuc7refusestoboot.md
How to fix Intel NUC that refuses to boot

Recently I have got a problem. My NUC7 refused to boot OS. The sympthom was exact as in this posting. The power button turned to solid amber/orange color (no blinking).

I've tried holding the power button for any length between 3 to 15 seconds, no changes.

Fortunately I solved the problem following an advice from Intel NUC community. The link to possible solutions is here.

I diassembled the NUC7 to reach an opposite side of the main board (with cooling fan and CMOS battery). I disconnected the battery for 15 minutes, and then connected it again. It solved the problem with power indicator and booting.

@uncomfyhalomacro
uncomfyhalomacro / SOS.md
Created March 19, 2022 00:53 — forked from vodik/SOS.md
_Never_ -Sy when installing!

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

@uncomfyhalomacro
uncomfyhalomacro / arch-tricks.md
Last active January 13, 2022 09:59 — forked from juancarlospaco/arch-tricks.md
Arch Linux Tips & Tricks

Required Packages

sudo pacman -S xdelta3 ccache axel

pacman.conf

@uncomfyhalomacro
uncomfyhalomacro / README.md
Created December 6, 2021 07:23 — forked from progandy/README.md
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

@uncomfyhalomacro
uncomfyhalomacro / README.md
Created December 4, 2021 06:40 — forked from gbrlsnchs/README.md
Void Linux Installation Guide (UEFI + chroot + brtfs + LUKS-encrypted root and swapfile)

Installation guide for Void Linux with LUKS-encrypted btrfs root

NOTE

I have ported this Gist to a handbook. I'll not maintain this Gist anymore, but will keep it here for future references. You can access the respective chapter in the handbook here.

Introduction

In this guide you will find:

  • btrfs with Zstandard compression
  • LUKS-encrypted root and swapfile
  • GRUB with UEFI
@uncomfyhalomacro
uncomfyhalomacro / void-install.md
Created November 5, 2021 08:36 — forked from kongkrit/void-install.md
void linux installation on zfs root

Void Linux Root on ZFS Installation - glibc version

Part 1: Create a ZFS-Capable Installation

Create a void installation medium with ZFS (either a virtual hard disk or a USB stick)

Download ISO from here

  • choose void-live-x86_64-YYYYMMDD.iso - as of this writing (2020-03-20) the newest one is void-live-x86_64-20191109.iso
  • tested on VirtualBox 6.1 with the folllowing parameters:
    • system: chipset: ICH9, enable EFI, RAM: 2GB, 2 CPUs, enable nested VT-x/AMD-V
    • 3 SATA hard disks hanging of AHCI controller - 2 for mirror and the other 10GB for temp installation
    • IDE-CD-Rom on IDE PIIX4 controller.