Skip to content

Instantly share code, notes, and snippets.

View mateiidavid's full-sized avatar
🦖
Focusing

Matei David mateiidavid

🦖
Focusing
View GitHub Profile
@mateiidavid
mateiidavid / 8086dis.c
Last active February 19, 2024 20:33
perfaware-8086-pt-1
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define assert(expr) \
if (!(expr)) { \
printf("%s:%d %s() %s\n", __FILE__, __LINE__, __func__, #expr); \
*(volatile int *)0 = 0; \
}
From 651fc60940513e6a0f620813e2d6b1dafe54e0cd Mon Sep 17 00:00:00 2001
From: Matei David <[email protected]>
Date: Tue, 21 May 2024 09:04:19 +0000
Subject: [PATCH] Patch
Signed-off-by: Matei David <[email protected]>
---
Dockerfile | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
@mateiidavid
mateiidavid / pre-push.lua
Created May 30, 2024 13:53
Global hook to get confirmation when pushing to main
#!/usr/bin/lua
-- I think technically this will only work if we're on that branch?
-- gotta ReadTheFriendlyManual.
local CMD_GIT_BRANCH = 'git rev-parse --abbrev-ref HEAD'
-- Could use regex instead of basename here but I'm lazy like that
local CMD_GIT_REPO = 'git rev-parse --show-toplevel'
local PROTECTED_BRANCHES = {['main'] = true, ['master'] = true, ['add-git-hook'] = true}