Skip to content

Instantly share code, notes, and snippets.

; this defun ripped from http://www.emacswiki.org/emacs/narrow-indirect.el
(defun narrow-to-region-indirect-other-window (start end here text)
"`narrow-to-region' in a cloned indirect buffer in the other window.
The indirect buffer is named the same as the current buffer,
except it is suffixed by `:text'.
Non-interactively:
START and END are the region beginning and end.
HERE is where to place the cursor, relative to START.
TEXT is prefixed by `:' and appended to the
@ae-s
ae-s / unreal.c
Last active February 11, 2023 02:08
/* stupid C puzzle: without trying it in the computer, explain why
* does this not work
*/
#include <stdio.h>
#define NR1 5
#define NR2 4
#define NR3 3
#define NR4 2
@ae-s
ae-s / pngcap.py
Created September 21, 2020 05:43
pcap to png
#!/usr/local/bin/python3
from pcapfile import savefile
from PIL import Image
import sys
# turn a pcap into an image.
# each row of the image is one packet from the capture.
cap = open(sys.argv[1], 'rb')