Skip to content

Instantly share code, notes, and snippets.

View markomafs's full-sized avatar
:octocat:
Working from home

Marco Aurélio Ferreira de Souza markomafs

:octocat:
Working from home
View GitHub Profile
@markomafs
markomafs / README-python-service-on-systemd-activated-socket.md
Created June 8, 2018 03:05 — forked from drmalex07/README-python-service-on-systemd-activated-socket.md
An example network service with systemd-activated socket in Python. #systemd #python #socket #socket-activation

README

The example below creates a TCP server listening on a stream (i.e. SOCK_STREAM) socket. A similar approach can be followed to create a UDP server on a datagram (i.e. SOCK_DGRAM) socket. See man systemd.socket for details.

An example server

Create an simple echo server at /opt/foo/serve.py.

@markomafs
markomafs / README-Template.md
Created May 9, 2017 21:43 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@markomafs
markomafs / configure_docker0.sh
Created November 8, 2016 20:04
Change the IP subnet of Docker's docker0 interface
#!/bin/sh -e
#
# You can run this script directly from github as root like this:
# curl -sS https://gist.githubusercontent.com/fabiorphp/a94e0ea2558b3d10185d6d69d053c2b2/raw/configure_docker0.sh | sudo bash -s - 172.31.0.21/16
#
# * Make sure you replace "192.168.254.0/24" with the network that you want to use
#
# NOTE: This script is intended for Debian / Ubuntu only!
if [ $# -lt 1 ]; then