# 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")
# Delete unused images
docker system prune --all
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
| FROM php:7.2-rc-zts-alpine | |
| ARG APP_USER_USERNAME=app | |
| RUN apk update && apk add --no-cache \ | |
| sudo bash \ | |
| g++ make autoconf \ | |
| libxml2-dev icu-dev curl-dev pcre-dev | |
| RUN adduser -D -s /bin/bash $APP_USER_USERNAME \ |
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
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "log" | |
| "net" | |
| "net/http" | |
| "net/http/httputil" | |
| "net/url" |
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
| # https://stackoverflow.com/a/17678331/2190689 | |
| function git-pull-all() { | |
| START=$(git symbolic-ref --short -q HEAD); | |
| for branch in $(git branch | sed 's/^.//'); do | |
| git checkout $branch; | |
| git pull ${1:-origin} $branch || break; | |
| done; | |
| git checkout $START; | |
| }; |
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
| @version:3.2 | |
| # =============================================================================================== | |
| # Configuration file for syslog-ng, customized for remote logging | |
| # =============================================================================================== | |
| # Options | |
| # Note about $HOST / HOST | |
| # Description: The name of the source host where the message originates from. | |
| # If the message traverses several hosts and the chain_hostnames() option is on, the first host in the chain is used. | |
| # If the keep_hostname() option is disabled (keep_hostname(no)), the value of the $HOST macro will be the DNS hostname of the host that sent the message to syslog-ng OSE (that is, the DNS hostname of the last hop). In this case the $HOST and $HOST_FROM macros will have the same value. |
- Create a file on
/etc/systemd/system/docker.service.d/startup_options.conf
# /etc/systemd/system/docker.service.d/override.conf
[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376
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 | |
| declare(strict_types = 1); | |
| namespace App\Kafka; | |
| use RdKafka; | |
| use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
| use Symfony\Component\Console\Input\InputArgument; | |
| use Symfony\Component\Console\Input\InputInterface; |
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 | |
| /** | |
| * Creating MongoDB like ObjectIDs. | |
| * Using current timestamp, hostname, processId and a incremting id. | |
| * | |
| * @author Julius Beckmann | |
| */ | |
| function createMongoDbLikeId($timestamp, $hostname, $processId, $id) | |
| { |