# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")
References:
#!/bin/bash | |
function prompt_for_multiselect { | |
# little helpers for terminal print control and key input | |
GREEN='\033[00;32m' | |
YELLOW='\033[00;33m' | |
RESTORE='\033[0m' | |
ESC=$( printf "\033") | |
cursor_blink_on() { printf "$ESC[?25h"; } |
import ( | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds" | |
"github.com/aws/aws-sdk-go/aws/credentials/stscreds" | |
"github.com/aws/aws-sdk-go/aws/ec2metadata" | |
"github.com/aws/aws-sdk-go/aws/session" | |
) | |
func buildConfig() { |
/* | |
PUT THIS FILE IN ~/Library/KeyBindings/DefaultKeyBinding.dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely | |
match default behavior on Windows systems. This particular mapping assumes | |
that you have also switched the Control and Command keys already. | |
This key mapping is more appropriate after switching Ctrl for Command in this menu: | |
Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...-> | |
Change Control Key to Command | |
Change Command key to Control |
# Delete all containers
docker rm $(docker ps -aq)
# Delete all images
docker rmi $(docker images -q)
# Delete all untagged images
docker rmi $(docker images -q --filter "dangling=true")
References:
package server | |
import ( | |
"context" | |
"os" | |
"os/signal" | |
"syscall" | |
"time" | |
"golang.org/x/sync/errgroup" |
#!/usr/bin/python | |
from __future__ import print_function | |
import base64 | |
import commands | |
import json | |
import sys | |
import uuid | |
import xmltodict |
package main | |
import "fmt" | |
func addName(name string, callback func(string)) { | |
callback(name) | |
} | |
func main() { | |
addName("lamar", func(nm string) { |
package proxy | |
import ( | |
"io" | |
"log" | |
"net" | |
) | |
func Proxy(srvConn, cliConn *net.TCPConn) { | |
// channels to wait on the close event for each connection |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"code.google.com/p/go.crypto/ssh" | |
"code.google.com/p/go.crypto/ssh/terminal" | |
) |