Skip to content

Instantly share code, notes, and snippets.

@davidlohr
davidlohr / qemu-4xinterleave-1cfmw-2hb-2rp-type3.cfg
Last active December 24, 2024 16:06
syzkaller config - qemu deployment emulating a setup suitable for 4 way interleave. Only one fixed window provided, to enable 2 way interleave across 2 CXL host bridges. Each host bridge has 2 CXL Root Ports, with the CXL Type3 device directly attached (no switches).
{
"target": "linux/amd64",
"http": "127.0.0.1:56741",
"workdir": "workdir",
"kernel_obj": "/home/dave/code/linux/",
"image": "/img/bullseye.img",
"sshkey": "/img/bullseye.id_rsa",
"syzkaller": "/home/dave/code/syzkaller",
"procs": 8,
"type": "qemu",
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active December 24, 2024 16:05
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@miguelmota
miguelmota / bootable_usb.sh
Last active December 24, 2024 16:04
Linux copy img.xz to usb drive (bootable drive) using xzcat and dd
lsblk
sudo umount /dev/sd<?><?>
xzcat ~/Downloads/linux.img.xz | sudo dd of=/dev/sd<?> conv=fdatasync status=progress
@podgorskiy
podgorskiy / FrustumCull.h
Created July 12, 2017 10:33
Ready to use frustum culling code. Depends only on GLM. The input is only bounding box and ProjectionView matrix. Based on Inigo Quilez's code.
#include <glm/matrix.hpp>
class Frustum
{
public:
Frustum() {}
// m = ProjectionMatrix * ViewMatrix
Frustum(glm::mat4 m);
@ruanbekker
ruanbekker / tree_style_tab_firefox.md
Created November 28, 2019 06:18
Hide Native Tabs with Tree Style Tabs for Firefox
@Klerith
Klerith / vite-testing-config.md
Last active December 24, 2024 15:58
Vite + Jest + React Testing Library - Configuraciones a seguir

Instalación y configuracion de Jest + React Testing Library

En proyectos de React + Vite

  1. Instalaciones:
yarn add --dev jest babel-jest @babel/preset-env @babel/preset-react 
yarn add --dev @testing-library/react @types/jest jest-environment-jsdom
  1. Opcional: Si usamos Fetch API en el proyecto:
@sohamkamani
sohamkamani / rsa.js
Last active December 24, 2024 15:57
An example of RSA Encryption implemented in Node.js
const crypto = require("crypto")
// The `generateKeyPairSync` method accepts two arguments:
// 1. The type ok keys we want, which in this case is "rsa"
// 2. An object with the properties of the key
const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", {
// The standard secure default length for RSA keys is 2048 bits
modulusLength: 2048,
})
@JoshDevHub
JoshDevHub / my-lazy-vim.md
Created May 6, 2023 03:05
My LazyVim Setup

Basic LazyVim Setup with Ruby/Rails

A very basic setup for ruby/rails development using LazyVim

Prerequisites

First, you'll of course need neovim. I personally just use the stable release over nightly just because I dislike when things randomly break, and I have to stop working to deal with it. But do whatever you like.

Probably a good idea to start it and run :checkhealth to make sure everything works before proceeding.