Skip to content

Instantly share code, notes, and snippets.

View MattAlp's full-sized avatar
❄️

Matt MattAlp

❄️
View GitHub Profile
@Marcondiro
Marcondiro / intel_pt_kvm.md
Last active March 21, 2025 01:24
How to Enable Intel PT (Processor Trace) in QEMU-KVM VMs

How to Enable Intel PT (Processor Trace) in QEMU-KVM VMs

Caution

Intel PT virtualization is BROKEN, as it has multiple fatal flaws, several which put the host at risk. Use at your own risk.

This guide will most likely become obsolete once the feature will be removed from the various linux distros. For more info check out KVM: VMX: Mark Intel PT virtualization as BROKEN and CVE-2024-53135

This script sets KVM Processor Trace feature in host-guest mode enabling VMs to use intel-pt

@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active June 10, 2025 06:16
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@ekzhang
ekzhang / Buildcarte.ipynb
Last active April 7, 2025 00:59
Build Systems à la Carte — Python edition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Chillee
Chillee / 1-pw_op_fusion.py
Last active May 27, 2025 14:55
PT 2.0 Benchmarks
import torch
import torch._inductor.config
import time
torch._inductor.config.triton.cudagraphs = False
torch.set_float32_matmul_precision('high')
def bench(f, name=None, iters=100, warmup=5, display=True, profile=False):
for _ in range(warmup):
f()

immutable = deeply frozen

Immutable classes

Immutable core classes

  • TrueClass
  • FalseClass
  • NilClass
  • Integer
@pmenke-de
pmenke-de / README.md
Last active May 10, 2024 09:54 — forked from chpatrick/nix-cmake
Using CLion with Nix

let's say you have a C++ project in Nix that you want to work on with CLion so that the nix dependencies are available.

  1. create a .nix utility directory in your project directory.
  2. put the below nix-run.sh and nix-cmake.sh in the .nix directory.
  3. in the .nix directory create symlinks for make, gcc, g++ - and maybe more tools, that need to have the nix dependencies and build tools available - and point them to nix-run.sh
  4. then, in Settings -> Build, Execution, Deployment -> Toolchains set CMake to the path to nix-cmake.sh and point all other build tools to the symlinks you've created.
@ityonemo
ityonemo / test.md
Last active May 10, 2025 18:28
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@alsunseri
alsunseri / Amazon_AWS_Linux_2_on_KVM_qemu.md
Last active October 31, 2024 20:36
Install and run Amazon AWS Linux 2 locally on KVM virt-manager with qemu virtual disk
@spalladino
spalladino / falsehoods-that-ethereum-programmers-believe.md
Last active December 31, 2024 13:29
Falsehoods that Ethereum programmers believe

Falsehoods that Ethereum programmers believe

I recently stumbled upon Falsehoods programmers believe about time zones, which got a good laugh out of me. It reminded me of other great lists of falsehoods, such as about names or time, and made me look for an equivalent for Ethereum. Having found none, here is my humble contribution to this set.

About Gas

Calling estimateGas will return the gas required by my transaction

Calling estimateGas will return the gas that your transaction would require if it were mined now. The current state of the chain may be very different to the state in which your tx will get mined. So when your tx i

@jthodge
jthodge / universal-switcher
Created September 6, 2020 22:07
Show macOS app switcher across all monitors
defaults write com.apple.Dock appswitcher-all-displays -bool true
killall Dock