-
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
- Delete all untagged images
digraph architecture { | |
rankdir=LR; | |
subgraph client_side_apps { | |
front_end -> {auth_api, my_app_api}; | |
extension -> {auth_api, my_app_api}; | |
{rank=same; front_end, extension, auth_api}; | |
} | |
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
Delete all containers
$ docker ps -q -a | xargs docker rm
-q prints only the container IDs -a prints all containers
Notice that it uses xargs to issue a remove container command for each container ID
.git | |
.gitignore | |
doc | |
.yardoc | |
coverage | |
jsdoc | |
tmp | |
log | |
README.md | |
public/uploads/ |
# Call scopes directly from your URL params: | |
# | |
# @products = Product.filter(params.slice(:status, :location, :starts_with)) | |
module Filterable | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Call the class methods with the same name as the keys in <tt>filtering_params</tt> | |
# with their associated values. Most useful for calling named scopes from |
# lib/custom_logger.rb | |
class CustomLogger < Logger | |
def format_message(severity, timestamp, progname, msg) | |
"#{timestamp.to_formatted_s(:db)} #{severity} #{msg}\n" | |
end | |
end | |
logfile = File.open("#{Rails.root}/log/custom.log", 'a') # create log file | |
logfile.sync = true # automatically flushes data to file | |
CUSTOM_LOGGER = CustomLogger.new(logfile) # constant accessible anywhere |
# Set iTerm2 tab titles | |
tabTitle() { echo -ne "\033]0;"$*"\007"; } | |
# Always list directory contents and set title upon 'cd' | |
cd() { builtin cd "$@"; ls -lFah; tabTitle ${PWD##*/}; } |
class InitialMigration < ActiveRecord::Migration[5.0] | |
def change | |
enable_extension "pgcrypto" unless extension_enabled?("pgcrypto") | |
end | |
end |
This document describes how to set up an OS X to be a syslog server that logs messages from the local network. It was largely meant for my own purposes so that I don't forget what I did, but feel free to use it for your own purposes.
A problem with just "turning this on" is that you will not see the correct hostname in the syslog entries. What we will do is use