Skip to content

Instantly share code, notes, and snippets.

View j4cobgarby's full-sized avatar
🥱

Jacob Garby j4cobgarby

🥱
View GitHub Profile
network:
ethernets:
enp0s3:
dhcp4: true
enp0s8:
dhcp4: false
addresses:
- 192.168.56.5/24 #192.168.56.6/24 for the worker
version: 2
@j4cobgarby
j4cobgarby / pintest.c
Last active January 18, 2024 08:39
A simple C program to test thread pinning
/* pintest.c
* Runs n threads, pinned to the first n CPUs, until you press enter.
* n is specified as a command line argument.
* Each thread runs an infinite loop (100% cpu usage in theory).
*/
#define _GNU_SOURCE
#include <pthread.h>
#include <sched.h>
#include <stdio.h>
@j4cobgarby
j4cobgarby / asminfo.md
Last active April 25, 2021 20:50
Some useful information for writing assembly code on 64bit linux

Integer registers

R0  R1  R2  R3  R4  R5  R6  R7  R8  R9  R10  R11  R12  R13  R14  R15
RAX RCX RDX RBX RSP RBP RSI RDI

R0D R1D R2D R3D R4D R5D R6D R7D R8D R9D R10D R11D R12D R13D R14D R15D
EAX ECX EDX EBX ESP EBP ESI EDI

R0W R1W R2W R3W R4W R5W R6W R7W R8W R9W R10W R11W R12W R13W R14W R15W
@j4cobgarby
j4cobgarby / sfml-setup.sh
Created July 26, 2017 21:09
Generates a clean SFML project for you! Includes a Makefile
# Put this in your /bin
# You might need to write 'chmod a+x /bin/sfml-setup.sh'
#!/bin/bash
mkdir $1
cd $1
mkdir src
touch src/main.cpp
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style id="jsbin-css">
body {
background-color: white;