Skip to content

Instantly share code, notes, and snippets.

Working from home

Chris Coetzee chriscz

Working from home
  • Activitar
  • South Africa
View GitHub Profile

Keybase proof

I hereby claim:

  • I am chriscz on github.
  • I am chriscz ( on keybase.
  • I have a public key whose fingerprint is 53C4 0540 6C16 09E7 F32A A341 AA42 2257 9499 8735

To claim this, I am signing this object:

chriscz / .gitignore
Last active Feb 12, 2021 — forked from phansch/
Improved YARD cheatsheet
# Make sure you grab the latest version
set -euo pipefail
chriscz /
Last active Dec 27, 2016
Snippet for signal handling in Python (useful for monitoring)
import signal
import os
import readline
from pprint import pprint
def handle_shell(signal, frame):
frames = []
while frame:
chriscz /
Last active Feb 10, 2017
Python snippet for monitoring where files were opened
# This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
chriscz / mucow.c
Last active Apr 8, 2018
Dirty COW PoC with multipage support
View mucow.c
* Multipage COW PoC
#include <fcntl.h>
#include <pthread.h>
#include <string.h>
#include <stdio.h>
#include <stdint.h>
#include <sys/mman.h>
#include <sys/stat.h>
chriscz /
Last active Jan 6, 2021
A python script to notify you of your current TimeWarrior task
#!/usr/bin/env python
# Notifies the user of the curently active TimeWarrior task every m minutes (default 10min).
# Requirements
# - python 2.7
# - pynotify
# Usage:
# python [optional seconds]
import sys
import pynotify