To enable NAT function, you must DISABLE Source/Destination Check to let this happen.
Resize EBS volume
Install self-signed cert in chromium on linux: | |
then you don't get complaints, will if it changes (MOTM attack?) | |
First, click on broken https in address bar & export certificate as a .der file | |
certutil -d sql:$HOME/.pki/nssdb -A -t "P,," -n <cert nickname> -i <cert file> |
import datetime | |
import time | |
def pause_2b_nice(func): | |
'''Pause the execution for however long func took to run. | |
Useful for not overloading servers when downloading assets. | |
''' | |
def inner(*args, **kwargs): | |
dt_start = dt_end = datetime.datetime.now() | |
ret = func(*args, **kwargs) |
For a provisioner to work, it must be installed on the local system. with ansible provisioner, need to ansible-playbook on local system |
PID==$(docker inspect --format '{{.State.Pid}}' my_container_id) | |
nsenter --mount --uts --ipc --net --pid --target $PID |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: portforwarding | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 3 5 | |
# Default-Stop: 0 1 2 6 | |
# Description: Start port redirection | |
### END INIT INFO | |
HTML/CSS tricks | |
from: https://www.quora.com/Web-Development/What-are-the-most-interesting-HTML-JS-DOM-CSS-hacks-that-most-web-developers-dont-know-about | |
different node depth colors, for identifying layouts on page | |
* { background-color: rgba(255,0,0,.2); } | |
* * { background-color: rgba(0,255,0,.2); } | |
* * * { background-color: rgba(0,0,255,.2); } | |
* * * * { background-color: rgba(255,0,255,.2); } | |
* * * * * { background-color: rgba(0,255,255,.2); } |
never use ec2 - exact_count paramter. This TERMINATED all the running instances except for exact_count number. This can have disatirous results, i hammered the whole cdlib dsc archivesspace server setup in AWs with this option. TODO: NEEDS to be noted in the options docs on this exact_count param. | |
use stete: present to create a new instance | |
not sure what state: running causes | |
always disable api termination | |
set to NOT DELETE on termination on ALL VOULUMES | |
TODO: REBUILD FROM SCRATCH: FRONT END WITH APACHE PROXY (due to nginx mangling of paths see: apache directive = <TODO: lookup> |
http://www.docker.com/tryit/ - nice 10 min tutorial intro | |
https://registry.hub.docker.com/ - docker registry, a repo for docker images | |
http://serversforhackers.com/articles/2014/03/20/getting-started-with-docker/ - good post on starting with docker | |
http://www.centurylinklabs.com/what-is-docker-and-when-to-use-it/ - article on use cases for docker | |
http://blog.abhinav.ca/blog/2014/06/17/develop-a-nodejs-app-with-docker/ - interesting tutorial with a typical development workflow, nice how links working directory to container source dir so edits on host will show up in container | |
/var/lib/docker is where the data files for docker live on ubuntu | |
Use "Automated Build Repositories" or official images as a base for your own. You can pull the github repo for the automated build repos and build yourself. Can then modify the Dockerfile to suit your needs. |
import smtpd | |
import asyncore | |
d=smtpd.DebuggingServer(('127.0.0.1', 25), None) | |
try: | |
asyncore.loop() | |
except KeyboardInterrupt: | |
pass |