Skip to content

Instantly share code, notes, and snippets.

@TheCleric
TheCleric / badmem.c
Created May 2, 2023 21:33
Reserve bad memory addresses before another app uses them
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
// 512 bytes of padding on each side
#define PADDING 0x200
int main(int argc, char *argv[]) {
if (argc < 2) {
printf("Usage: badmem <badmemfile.csv>\n");
@TheCleric
TheCleric / git-prompt.sh
Created September 29, 2020 19:47
Customized Git Terminal Prompt Generator
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
@TheCleric
TheCleric / .zshrc
Created September 29, 2020 19:44
ZSH Profile
GIT_PS1_SHOWDIRTYSTATE=1
GIT_PS1_SHOWDIRTYSTATE_COUNT=1
GIT_PS1_SHOWUNTRACKEDFILES=1
GIT_PS1_SHOWUNTRACKEDFILES_COUNT=1
GIT_PS1_SHOWCOLORHINTS=true
. ~/git-prompt.sh
# venv