Use Python to:
- send a plain text email
- send an email with attachment
- receive and filter emails according to some criteria
Use Python to:
docker logs nginx 2>&1 | grep "127." | |
# ref: http://stackoverflow.com/questions/34724980/finding-a-string-in-docker-logs-of-container |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
package main | |
// More info on Getwd() | |
// https://golang.org/src/os/getwd.go | |
// | |
import( | |
"os" | |
"fmt" | |
"log" | |
) |
#!/usr/bin/env python3 | |
"""Easily put time restrictions on things | |
Note: Requires Python 3.x | |
Usage as a context manager: | |
``` | |
with timeout(10): | |
something_that_should_not_exceed_ten_seconds() | |
``` |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
postgres: | |
image: postgres:9.4 | |
volumes: | |
- ./init.sql:/docker-entrypoint-initdb.d/init.sql |
cmake_minimum_required(VERSION 3.6) | |
project(CmakeVirtualenv) | |
enable_testing() | |
# Find Python and Virtualenv. We don't actually use the output of the | |
# find_package, but it'll give nicer errors. | |
find_package(PythonInterp 2.7 REQUIRED) | |
find_program(VIRTUALENV virtualenv) |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
"syscall" | |
"time" | |
) |