Skip to content

Instantly share code, notes, and snippets.

View mdhowle's full-sized avatar

Matthew Howle mdhowle

View GitHub Profile
@mdhowle
mdhowle / uwsgi-and-nginx.md
Created May 15, 2018 14:10 — forked from pcostesi/uwsgi-and-nginx.md
uWSGI and NGiNX
@mdhowle
mdhowle / log_test11.py
Created December 15, 2017 16:00 — forked from anonymous/log_test11.py
Test script showing usage of a buffering SMTP handler.
#!/usr/bin/env python
#
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose and without fee is hereby granted,
# provided that the above copyright notice appear in all copies and that
# both that copyright notice and this permission notice appear in
# supporting documentation, and that the name of Vinay Sajip
# not be used in advertising or publicity pertaining to distribution
@mdhowle
mdhowle / tcp_server.c
Created March 27, 2017 03:02 — forked from oleksiiBobko/tcp_server.c
Simple socket server in C using threads (pthread library) Compiles on linux
/*
C socket server example, handles multiple clients using threads
Compile
gcc server.c -lpthread -o server
*/
#include<stdio.h>
#include<string.h> //strlen
#include<stdlib.h> //strlen
#include<sys/socket.h>
@mdhowle
mdhowle / nginx-jail.sh
Created March 17, 2017 02:18 — forked from adityamukho/nginx-jail.sh
Setup a CHROOT jail at `/srv/http` for a public Nginx server on Arch Linux.
#!/bin/bash
pacman -S nginx
export JAIL=/srv/http
# Create Necessary Devices
mkdir $JAIL/dev
mknod -m 0666 $JAIL/dev/null c 1 3
mknod -m 0666 $JAIL/dev/random c 1 8
mknod -m 0444 $JAIL/dev/urandom c 1 9