start new:
tmux
start new with session name:
tmux new -s myname
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| # list pid, execution time, and query text for running queries | |
| def pg_ps | |
| now = Time.now | |
| ActiveRecord::Base.connection.execute("SELECT pid, query, query_start FROM pg_stat_activity WHERE state='active'").to_a.each do |q| | |
| printf "%8d %10.2f %s\n", q['pid'], now - DateTime.parse(q['query_start']), q['query'] | |
| end | |
| nil | |
| end | |
| # cancel the current query for the given process |
| version: '3' | |
| services: | |
| traefik: | |
| restart: unless-stopped | |
| image: traefik:v2.0.2 | |
| ports: | |
| - "80:80" | |
| - "443:443" | |
| labels: | |
| - "traefik.http.services.traefik.loadbalancer.server.port=8080" |