Skip to content

Instantly share code, notes, and snippets.

View machitgarha's full-sized avatar

Mohammad Amin Chitgarha machitgarha

View GitHub Profile
@Wren360
Wren360 / gist:6b147754435b6c60c0b9b72afe8beb2c
Last active September 10, 2026 11:47
CachyOS Scheduler Testing Kernel 7.2.0-1
CPU: AMD 7800X3d
Ram: 6000Mhz 32GB DDR5
# CachyOS Kernel & sched-ext Benchmark Summary
Benchmarked on Linux Kernel `7.2.0-1-cachyos` using the CachyOS `benchie` test suite.
Overall Ranking
| Rank | Kernel / Scheduler | Version | Total Score (↓) | Total Time (s) (↓) | schbench p99 (µs) (↓) | schbench RPS (↑) | cyclictest Max (µs) (↓) |
@MangaD
MangaD / cpp_precompiled_headers.md
Created March 15, 2025 08:06
Comprehensive Guide to Precompiled Headers (PCH) in C++

Comprehensive Guide to Precompiled Headers (PCH) in C++

CC0

Disclaimer: ChatGPT generated document.

1. Introduction to Precompiled Headers

🔹 What Are Precompiled Headers?

@qguv
qguv / vscode-wayland.md
Last active June 26, 2026 03:17
Visual Studio Code: Enable native Wayland support

Native wayland support is now working consistently for me in VSCode, giving much better text rendering. Unfortunately, it's still hidden behind some command-line flags.

By adding some files to /usr/local/*, you can ensure that VSCode always launches with these flags.

Adding launch flags to VSCode

Assuming that the VSCode launcher is /usr/bin/code-oss (as is the case in Arch):

  1. Create /usr/local/bin/code-oss with the following content:
@yodermk
yodermk / centos8-9.sh
Created February 13, 2022 19:08
Commands to live-upgrade CentOS Streams 8 -> 9
# The general procedure here is adapted from the 7->8 guide here. https://www.tecmint.com/upgrade-centos-7-to-centos-8/
#
# It is a curated list of my bash history. I entered other commands so hopefully I got the right ones here.
yum upgrade
reboot
dnf install epel-release
dnf install rpmconf
dnf install yum-utils
rpmconf -a # answer "n" to both things
@GuillaumeDua
GuillaumeDua / Concept-based polymorphism in modern Cpp.md
Last active August 6, 2026 15:06
Concept-based polymorphism in modern C++

Concept-based polymorphism in modern C++

Date 05-05-2021 - 10-17-2023
Revision R3
Author Guillaume Dua
Reviewers Loïc Joly, Antoine Morrier
@andrey-legayev
andrey-legayev / perf-test.php
Last active January 7, 2024 21:24
PHP benchmark: in_array() vs. binary search in sorted array
<?php
/**
* Binary search - search element in sorted array of values and return true/false
*
* @param $value
* @param $array array
* @return bool
*/
function in_array_binary($value, array &$array)
@Nihhaar
Nihhaar / linux_performance.md
Created September 18, 2017 18:42 — forked from marianposaceanu/linux_performance.md
Linux simple performance tweaks

Linux simple performance tweaks

Change the I/O Scheduler

Open $ vim /etc/default/grub then add elevator=noop next to GRUB_CMDLINE_LINUX_DEFAULT. Run $ update-grub and $ cat /sys/block/sda/queue/scheduler to be sure that noop is being used:

$ vim /etc/default/grub
$ update-grub
$ cat /sys/block/sda/queue/scheduler

[noop] deadline cfq

@sergey-dryabzhinsky
sergey-dryabzhinsky / sysctl-proxmox-tune.conf
Last active August 9, 2026 08:45
Most popular speedup sysctl options for Proxmox. Put in /etc/sysctl.d/
###
# Proxmox or other server kernel params cheap tune and secure.
# Try it if you have heavy load on server - network or memory / disk.
# No harm assumed but keep your eyes open.
#
# @updated: 2020-02-06 - more params used, adjust some params values, more comments on params
#
### NETWORK ###
@mcastelino
mcastelino / iptables-cheatsheet.md
Last active April 25, 2026 17:39
iptables-cheatsheet

The netfilter hooks in the kernel and where they hook in the packet flow

The figure below calls out

  • The netfilter hooks
  • The order of table traversal
@flibitijibibo
flibitijibibo / flibitPackaging.md
Created June 17, 2016 16:00
Hope you like reading ldd output!

A week ago I was CC'd in on a thread about Linux packaging, and how to avoid doing it the wrong way (i.e. RPM, Deb, etc.). I've always used MojoSetup and I've never forced distributions to do any additional work, but this is still a new concept to a lot of people. Additionally, Amos suggested that I expand on Itch's FNA appendix, so here's a guide on how I package my games.

This is a bit of an expansion on my MAGFest 2016 presentation, which you can find here:

http://www.flibitijibibo.com/magfest2016/

https://www.youtube.com/watch?v=B83CWUh0Log

I would recommend looking at that first! After that, read on...