Docker is a useful abstraction for processes
- Web application server (django/rails/tomcat/...)
- Database
- Reverse HTTP proxy (nginx/apache)
... each in their own Docker container
#include <iostream> | |
#include <cstdlib> | |
using namespace std; | |
// Arbitrary precision c++ library | |
// compile with: | |
// gcc thisfile.c -lgmp -lgmpxx -o mybinary | |
#include <gmpxx.h> | |
int main(int argc, char **argv){ |
Docker is a useful abstraction for processes
... each in their own Docker container
#!/usr/bin/env python | |
# This script opens CONNECTIONS simultaneous connections to a remote socket, | |
# and sends a fixed string before closing the connection. The process is then | |
# repeated indefinitely | |
# Intended to unit test the tcp_server.py script | |
import asyncore | |
import socket |
I hereby claim:
To claim this, I am signing this object:
module https://gist.github.com/dwurf/25d26181b407a58ab8a67e824675e487 |
.PHONY: run | |
mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) | |
pth := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) | |
run: $(pth)/venv | |
$(pth)/venv/bin/python3 $(pth)/query.py | |
$(pth)/venv: |
#!/usr/bin/env python | |
"""Script for sending an email (with an optional file attachment).""" | |
# Modified from the documentation at | |
# https://docs.python.org/2/library/email-examples.html | |
# | |
# Tested against python 2.6, 2.7 and 3.6 | |
# | |
# For help, run this script! |