Skip to content

Instantly share code, notes, and snippets.

View pnappa's full-sized avatar
👨‍🍳
stick with the prod

Patrick Nappa pnappa

👨‍🍳
stick with the prod
View GitHub Profile
@pnappa
pnappa / wrapper.c
Created May 6, 2019 09:48
Catch a sigchld in a subprocess, letting me know whether the subsubprocess has died.
#define _POSIX_C_SOURCE 200809
#include <signal.h>
#include <stdatomic.h>
#include <unistd.h>
#include <threads.h>
#include <stdio.h>
#include <stdbool.h>
#include <poll.h>
#include <string.h>
#include <stdlib.h>
### Keybase proof
I hereby claim:
* I am pnappa on github.
* I am pnappa (https://keybase.io/pnappa) on keybase.
* I have a public key ASDs-jYv--4bMdTqrtowM0MLW7rdBDlqsfsfSVG_PUFzWgo
To claim this, I am signing this object:
@pnappa
pnappa / gitclono.py
Last active August 15, 2018 04:34
Python script to clone git repos into a structured format
#!/usr/bin/python3
"""
This script will clone your repositories to a consistent directory hierarchy.
e.g the following will install the repo to ~/github.com/pnappa/xkcdfools
$ gitclono.py git@github.com:pnappa/xkcdfools.git
This is a nice way to organise your repositories, symlinking to them when necessary.
"""
@pnappa
pnappa / alexatest.sh
Created April 12, 2018 04:55
check which of the alexa top-1m are not registered
#!/bin/bash
cut -d',' -f2 "top-1m.csv" | while read -r domain; do
nslookup "$domain" > /dev/null || echo "$domain"
done
" The hell that is my vimrc
set nocompatible " be iMproved, required
filetype off " required
"powerline
"set rtp+=/home/pnappa/.local/lib/python3.5/site-packages/powerline/bindings/vim/
"set laststatus=2
" fzf