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
" 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
@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
@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.
"""
### 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 / 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>
@pnappa
pnappa / pipeon.c
Last active May 10, 2019 13:19
pipe on
#define _POSIX_C_SOURCE 200809
#include <signal.h>
#include <stdatomic.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/prctl.h>
#include <assert.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdbool.h>
@pnappa
pnappa / config
Created September 16, 2019 06:44
i3 config.
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@pnappa
pnappa / setup.sh
Last active October 5, 2020 11:31
AWS Lightsail Docker Compose Hasura
# rough script to install docker-compose and setup ec2 user to use it.
# this is the pseudo-code equivalent of a shell script.. :)
# run stuff as root
# install docker and stuff and allow the ec2-user to run it
sudo yum install docker
sudo service docker start
sudo usermod -a -G docker ec2-user
sudo yum install -y git
@pnappa
pnappa / baby.gif
Last active December 22, 2023 22:20
baby.gif
@pnappa
pnappa / clock.svg
Last active January 31, 2020 11:37
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.