Skip to content

Instantly share code, notes, and snippets.

View badembed's full-sized avatar

Alex A badembed

View GitHub Profile
@badembed
badembed / script.py
Created March 25, 2023 12:35
Run 2 processes and wait for address space intersaction for a buffer
#!/usr/local/bin/python3
import subprocess
import time
import sys
import pexpect
def intersection(ex_start, ex_end, start, end):
print("Intersection: ")
print(ex_start, ex_end)
@badembed
badembed / Makefile
Created February 15, 2020 18:12 — forked from lindenb/Makefile
including git-hash in a C program.
a.out: test.c githash.h
gcc $<
githash.h:
echo -n '#ifndef GIT_HASH\n#define GIT_HASH "' > $@ && \
git rev-parse HEAD | tr -d "\n" >> $@ && \
echo '"\n#endif' >> $@
@badembed
badembed / doom.txt
Created September 21, 2019 13:52 — forked from hjertnes/doom.txt
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@badembed
badembed / emacs26.sh
Created September 21, 2019 09:49 — forked from Yevgnen/emacs26.sh
Compile Emacs 26 on Ubuntu 16.04
mkdir emacs
cd emacs
git init
git remote add origin https://github.com/emacs-mirror/emacs.git
git fetch --depth 1 origin emacs-26
git reset --hard FETCH_HEAD
sudo apt install autoconf make gcc texinfo libgtk-3-dev libxpm-dev libjpeg-dev libgif-dev libtiff5-dev libgnutls-dev libncurses5-dev
./autogen.sh
./configure
make
@badembed
badembed / tmux.md
Created April 21, 2019 11:25 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@badembed
badembed / gist:55db6df00af9ebcac036d9a74a6103a1
Created January 12, 2019 18:03 — forked from sgergely/gist:3793166
Midnight Commander Keyboard Shortcuts for Mac OSX
----- Esc -----
Quick change directory: Esc + c
Quick change directory history: Esc + c and then Esc + h
Quick change directory previous entry: Esc + c and then Esc + p
Command line history: Esc + h
Command line previous command: Esc + p
View change: Esc + t (each time you do this shortcut a new directory view will appear)
Print current working directory in command line: Esc + a
Switch between background command line and MC: Ctrl + o
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name