This file contains hidden or 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
| # Delete all containers | |
| docker rm $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi $(docker images -q) |
This file contains hidden or 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
| docker stop $(docker ps -a -q) | |
| docker rm $(docker ps -a -q) |
This file contains hidden or 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
| # Make sure that exited containers are deleted | |
| docker rm -v $(docker ps -a -q -f status=exited) | |
| # Remove unwanted ‘dangling’ images. | |
| docker rmi $(docker images -f "dangling=true" -q) | |
| # Unwanted volumes | |
| docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/lib/docker:/var/lib/docker --rm martin/docker-cleanup-volumes | |
| # or just | |
| docker rm -v $(docker ps -a -q -f status=exited) && \ | |
| docker rmi $(docker images -f "dangling=true" -q) && \ |
This file contains hidden or 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
| <?php | |
| // | |
| // By: Spicer Matthews <[email protected]> | |
| // Company: Cloudmanic Labs, LLC | |
| // Date: 5/19/2011 | |
| // Description: This is an echo server. It will read any messages sent in and then echo them back out. | |
| // | |
| $hostname = "127.0.0.1"; | |
| $portno = "7834"; | |
| ob_implicit_flush(); |
This file contains hidden or 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/env python | |
| # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE | |
| # Written by Nathan Hamiel (2010) | |
| from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
| from optparse import OptionParser | |
| class RequestHandler(BaseHTTPRequestHandler): | |
| def do_GET(self): |
This file contains hidden or 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 | |
| appname="my-docker-app" | |
| if [ $1 == "deploy" ] | |
| then | |
| host="ec2-user@ec2" | |
| ssh -tt $host "mkdir $appname && cd $appname && sudo chmod 777 * -R" | |
| rsync --progress --exclude-from 'deploy.exclude' -avz -e "ssh" . $host:$appname | |
| ssh -tt $host "cd $appname && docker build -t $appname ." | |
| ssh -tt $host "cd $appname && docker ps -q --filter='image=$appname' | xargs docker stop" |
This file contains hidden or 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/ruby | |
| # chkconfig: 35 99 01 | |
| # description: EC2 DNS registration | |
| # processname: ec2hostname | |
| require 'aws-sdk' | |
| require 'net/http' | |
| `touch /var/lock/subsys/ec2hostname` |
This file contains hidden or 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
| To search scripts, stylesheets and snippets by filename you can use: | |
| * Ctrl + O (Windows) | |
| * Cmd + O (Mac OSX) | |
| To perform a text search within the current file you can use: | |
| * Ctrl + F (Windows) | |
| * Cmd + F (Mac OSX) |
This file contains hidden or 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
| mogrify -resize 50% -unsharp 0.25x0.25+8+0.065 -dither None -posterize 136 -quality 82 -define jpeg:fancy-upsampling=off *.jpg |
This file contains hidden or 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
| <?php | |
| $usuario = 'sigep'; | |
| $senha = 'n5f9t8'; | |
| $contrato = '9912208555'; | |
| $cartao = '0057018901'; | |
| $context = stream_context_create(array( | |
| 'ssl' => array( | |
| 'verify_peer' => false, | |
| 'verify_peer_name' => false, |