Skip to content

Instantly share code, notes, and snippets.

@mpontillo
mpontillo / dnsperf_install.sh
Created May 30, 2017 17:47 — forked from hanshasselberg/dnsperf_install.sh
Install dnsperf on ubuntu
sudo apt-get install -y bind9utils libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev
curl ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz -O
tar xfvz dnsperf-src-2.0.0.0-1.tar.gz
cd dnsperf-src-2.0.0.0-1
./configure
make
sudo make install
@mpontillo
mpontillo / markdown_doc
Last active May 26, 2017 20:04 — forked from jiffyclub/markdown_doc
This script turns Markdown into HTML using the Python markdown library and wraps the result in a complete HTML document with default Bootstrap styling so that it's immediately printable. Requires the python libraries jinja2, markdown, and mdx_smartypants.
#!/usr/bin/env python
import argparse
import sys
import jinja2
import markdown
# To install dependencies in a virtualenv:
# $ virtualenv ~/venv-markdown/
@mpontillo
mpontillo / encfs-agent
Last active August 29, 2015 14:06 — forked from mprymek/encfs-agent
#! /usr/bin/env python2
"""
encfs-agent
Mounts encfs filesystems with passwords generated using private keys stored in ssh-agent.
You can have any number of encrypted filesystems ("vaults") under VAULTS_DIR. Password for
each of them is derived from its name and given private key stored in ssh-agent.
You can use ssh-askpass for ssh-agent if you want.
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
int main(int argc, char* argv[])
{
int s;