This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DRY -> Don't repeat yourself! | |
YAGNI -> You aren't gonna need it (yet) | |
SRP -> Single Responsibility Principle (code does one thing, and only one thing very well) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
watch <command> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl --silent -i -H "Content-Type: application/json" -X POST -d "{\"json\": {\"data\":\"here\"}}" http://theurl.com/to/post/to | tail -n 1 | python -m json.tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
/** | |
* DNSLookup is a class which demonstrates several features of <a href="http://docs.oracle.com/javase/7/docs/api/java/net/InetAddress.html">java.net.InetAddress</a> | |
* @author Jurrian Fahner | |
*/ | |
public class DNSLookup { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/usr/sbin/nginx -t -c /etc/nginx/nginx.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
domainname="www.dommainname.com" | |
namekeyfile="$domainname.key" | |
namecsrfile="$domainname.csr" | |
# first create a private key | |
openssl genrsa -out $namekeyfile 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
from subprocess import * | |
#get all numeric IDs of active containers | |
allActiveContainers = Popen(["docker", "ps", "-q"], stdout=PIPE).communicate()[0] | |
#run the inspect on all active containers to produce one json file | |
check_call(["docker", "inspect"] + allActiveContainers.strip().split('\n')) |
NewerOlder