Skip to content

Instantly share code, notes, and snippets.

View magick93's full-sized avatar
💩
Focusing

magick93

💩
Focusing
View GitHub Profile
@magick93
magick93 / docker-cleanup-resources.md
Created October 16, 2017 22:42 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// 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

{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"raw_mimetype": "text/html",
"slideshow": {
"slide_type": "slide"
}
},
@magick93
magick93 / docker-clean.sh
Created October 1, 2017 06:37 — forked from mugifly/docker-clean.sh
Cleanup Script for Docker Images and Containers
#!/bin/sh
echo -e "-- Removing exited containers --\n"
docker ps --all --quiet --filter="status=exited" | xargs --no-run-if-empty docker rm --volumes
echo -e "\n\n-- Removing untagged images --\n"
docker rmi --force $(docker images | awk '/^<none>/ { print $3 }')
echo -e "\n\n-- Removing volume directories --\n"
docker volume rm $(docker volume ls --quiet --filter="dangling=true")
@magick93
magick93 / openshift-diagnostics
Created September 25, 2017 05:06
openshift-diagnostics
[Note] Determining if client configuration exists for client/cluster diagnostics
Info: Successfully read a client config file at '/root/.kube/config'
ERROR: [CED1008 from controller openshift/origin/pkg/cmd/admin/diagnostics/cluster.go]
Unknown error testing cluster-admin access for context 'research/<openshift-origin-domain>:8443/john':
the server has asked for the client to provide credentials (post subjectAccessReviews)
Info: Using context for cluster-admin access: 'default/<openshift-origin-domain>:8443/system:admin'
[Note] Performing systemd discovery
@magick93
magick93 / org.eclipselab.emf.ecore.protobuf-out
Created September 17, 2017 07:54
Maven output for christiankerl/org.eclipselab.emf.ecore.protobuf
[INFO] Scanning for projects...
[INFO] Resolving target platform for project MavenProject: org.eclipselab.emf.protobuf:org.eclipselab.emf.ecore.protobuf:0.1.0-SNAPSHOT @ /home/anton/git/org.eclipselab.emf.ecore.protobuf/org.eclipselab.emf.ecore.protobuf/pom.xml
[INFO] Resolving target platform for project MavenProject: org.eclipselab.emf.protobuf:org.eclipselab.emf.ecore.protobuf.tests:0.1.0-SNAPSHOT @ /home/anton/git/org.eclipselab.emf.ecore.protobuf/org.eclipselab.emf.ecore.protobuf.tests/pom.xml
[INFO] Resolving target platform for project MavenProject: org.eclipselab.emf.protobuf:org.eclipselab.emf.ecore.protobuf.feature:0.1.0-SNAPSHOT @ /home/anton/git/org.eclipselab.emf.ecore.protobuf/org.eclipselab.emf.ecore.protobuf.feature/pom.xml
[INFO] Resolving target platform for project MavenProject: org.eclipselab.emf.protobuf:org.eclipselab.emf.codegen.protobuf:0.1.0-SNAPSHOT @ /home/anton/git/org.eclipselab.emf.ecore.protobuf/org.eclipselab.emf.codegen.protobuf/pom.xml
[INFO] Resolving target platform for pro
@magick93
magick93 / protobuf-error
Created September 15, 2017 12:37
compile error protobuf 3.0.0
make[2]: Entering directory '/var/local/git/protobuf-3.0.0/src'
depbase=`echo google/protobuf/compiler/main.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
/usr/local/bin/wineg++ -DHAVE_CONFIG_H -I. -I.. -DHAVE_PTHREAD=1 -Wall -Wno-sign-compare -O2 -g -DNDEBUG -MT google/protobuf/compiler/main.o -MD -MP -MF $depbase.Tpo -c -o google/protobuf/compiler/main.o google/protobuf/compiler/main.cc &&\
mv -f $depbase.Tpo $depbase.Po
depbase=`echo google/protobuf/stubs/atomicops_internals_x86_gcc.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
/bin/bash ../libtool --tag=CXX --mode=compile /usr/local/bin/wineg++ -DHAVE_CONFIG_H -I. -I.. -DHAVE_PTHREAD=1 -Wall -Wno-sign-compare -O2 -g -DNDEBUG -MT google/protobuf/stubs/atomicops_internals_x86_gcc.lo -MD -MP -MF $depbase.Tpo -c -o google/protobuf/stubs/atomicops_internals_x86_gcc.lo google/protobuf/stubs/atomicops_internals_x86_gcc.cc &&\
mv -f $depbase.Tpo $depbase.Plo
libtool: compile: /usr/local/bin/wineg++ -DHAVE_CONFIG_H -I. -I.. -DHAVE_PTHREAD=1 -Wall -Wno-sign-comp
Step 14 : RUN ./installgrpc.sh
---> Running in d655726e38c6
+ git clone -b v1.6.0 --single-branch https://github.com/grpc/grpc /var/local/git/grpc
Cloning into '/var/local/git/grpc'...
Note: checking out 'b45b83ca2798126781fc878f459090ab881dcdf0'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
Submodule path 'third_party/benchmark': checked out '44c25c892a6229b20db7cd9dc05584ea865896de'
Submodule path 'third_party/boringssl': checked out 'be2ee342d3781ddb954f91f8a7e660c6f59e87e5'
Submodule path 'third_party/boringssl-with-bazel': checked out '886e7d75368e3f4fab3f4d0d3584e4abfc557755'
Submodule path 'third_party/cares/cares': checked out '7691f773af79bf75a62d1863fd0f13ebf9dc51b1'
Submodule path 'third_party/gflags': checked out '30dbc81fb5ffdc98ea9b14b1918bfe4e8779b26e'
Submodule path 'third_party/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'third_party/protobuf': checked out '80a37e0782d2d702d52234b62dd4b9ec74fd2c95'
Submodule path 'third_party/zlib': checked out 'cacf7f1d4e3d44d871b605da3b647f07d718623f'
[MAKE] Generating /var/local/git/grpc/libs/opt/pkgconfig/grpc.pc
[MAKE] Generating /var/local/git/grpc/libs/opt/pkgconfig/grpc_unsecure.pc
@magick93
magick93 / grpc docker - not working
Created September 14, 2017 07:38
Dockerfile (i386) based on working (64bit) Dockerfile
FROM i386/ubuntu:17.04
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
build-essential autoconf libtool \
git \
pkg-config \
&& apt-get clean
@magick93
magick93 / acmecontroller.log
Created September 11, 2017 11:01
Log from Acme Controller
2017-09-09T03:32:02.567487505Z INFO Starting controller
2017-09-09T03:32:02.568120346Z INFO ACME server url is 'https://acme-staging.api.letsencrypt.org/directory'
ERROR: logging before flag.Parse: W0909 03:32:02.568167 1 client_config.go:481] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work.
2017-09-09T03:32:02.569424298Z INFO AcmeController bootstraping DB
2017-09-09T03:32:02.569451026Z TRACE AcmeController bootstraping DB finished duration=255.79878ms start=2017-09-09T03:32:02.569451141Z end=2017-09-09T03:32:02.825249921Z
2017-09-09T03:32:02.825314019Z INFO AcmeController initializing
2017-09-09T03:32:02.825342972Z INFO AcmeController started
2017-09-09T03:32:02.825456625Z INFO Http-01: server listening on http://[::]:5000/
2017-09-09T03:32:02.983957969Z INFO RouteController initializing
2017-09-09T03:32:02.983988563Z INFO RouteController started