Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Sathiyarajan's full-sized avatar
:octocat:
I may be slow to respond.

sathyadev Sathiyarajan

:octocat:
I may be slow to respond.
View GitHub Profile
@Sathiyarajan
Sathiyarajan / docker_kill.sh
Created November 12, 2017 03:19 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@Sathiyarajan
Sathiyarajan / pep20_by_example.py
Created October 31, 2017 13:08 — forked from evandrix/pep20_by_example.py
PEP 20 (The Zen of Python) by example
#!/usr/bin/env python
"""
=====================================
PEP 20 (The Zen of Python) by example
=====================================
Usage: %prog
:Author: Hunter Blanks, hblanks@artifex.org / hblanks@monetate.com

Notes while learning Docker

These notes are derived from my efforts in working through The Docker Book: Containerization is the new virtualization written by James Turnbull. I highly recommend getting a copy of Jame's book which is an $8 dollar e-book on Amazon.

The following notes are my own and simply an interpretation of what James has written. Caveat lector.

Ensuring Docker is ready

$ docker info
@Sathiyarajan
Sathiyarajan / urllib2_upload.py
Created September 28, 2017 06:56 — forked from zhenyi2697/urllib2_upload.py
Python: urllib2 upload file demo
#!/usr/bin/python
# demo from here: http://pymotw.com/2/urllib2/index.html#uploading-files
import itertools
import mimetools
import mimetypes
from cStringIO import StringIO
import urllib
import urllib2