Skip to content

Instantly share code, notes, and snippets.

View gist:157e58226653a87d47f9e29bdd37f957
$ dstat
You did not select any stats, using -cdngy by default.
--total-cpu-usage-- -dsk/total- -net/total- ---paging-- ---system--
usr sys idl wai stl| read writ| recv send| in out | int csw
6 2 91 0 0| 679k 3332k| 0 0 | 62B 841B|6227 24k
6 2 92 0 0| 0 112k|1858B 785B| 0 0 |4803 21k
3 2 95 0 0| 256k 328k| 966B 278B| 0 0 |3943 20kTraceback (most recent call last):
File "/usr/bin/dstat", line 2847, in <module>
main()
File "/usr/bin/dstat", line 2687, in main
View gist:8696c0f21b33acc00266cc03d2100595
pipeline {
stages {
stage('test matrix') {
steps {
script {
// generate tasks
parallel(tasks)
}
}
}
View gist:988468c8466cff7e43a92681df011704
Sep 13 11:00:01 debian systemd[1]: docker.service: Unit entered failed state.
Sep 13 11:00:01 debian systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 13 11:00:01 debian systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Sep 13 11:00:01 debian dockerd[6038]: github.com/docker/docker/daemon/config.init()
Sep 13 11:00:01 debian dockerd[6038]: /build/docker-tianon-u6rS7G/docker-tianon-17.06.1/.gopath/src/github.com/docker/docker/daemon/config/config_unix.go:64 +0x6a fp=0xc420043f80 sp=0xc420043f40
Sep 13 11:00:01 debian dockerd[6038]: main.init()
Sep 13 11:00:01 debian dockerd[6038]: /build/docker-tianon-u6rS7G/docker-tianon-17.06.1/.gopath/src/github.com/docker/docker/cmd/dockerd/service_unsupported.go:15 +0x64 fp=0xc420043f88 sp=0xc420043f80
Sep 13 11:00:01 debian dockerd[6038]: runtime.main()
Sep 13 11:00:01 debian dockerd[6038]: /build/docker-tianon-u6rS7G/docker-tianon-17.06.1/golang/src/runtime/proc.go:173 +0x1d4 fp=0xc420043fd8 sp=0xc420043f88
@psftw
psftw / gist:babe9527533e1dc352aa3a3177b22871
Created Jul 9, 2017
JENKINS FORCIBLY TERMINATE WITH EXTREME PREJUDICE HARD KILL
View gist:babe9527533e1dc352aa3a3177b22871
Cancelling nested steps due to timeout
Body did not finish within grace period; terminating with extreme prejudice
Aborted by Peter Salvatore
Click here to forcibly terminate running steps
Terminating withEnv
Terminating withEnv
Terminating stage
Click here to forcibly kill entire build
Hard kill!
View gist:15a05d2abc6a757397bb85eac7b72f46
ubuntu@xenial:~$ sudo snap remove docker
docker removed
ubuntu@xenial:~$ sudo snap install --candidate docker
docker (candidate) 17.03.1-ce-0 from 'docker-inc' installed
ubuntu@xenial:~$ docker run -d --name test redis
Unable to find image 'redis:latest' locally
latest: Pulling from library/redis
10a267c67f42: Pull complete
5b690bc4eaa6: Pull complete
4cdd94354d2a: Pull complete
View gist:74e310e911d83518af37958912ca5090
$ docker run -it --name stack-temp haskell:8.0.2 stack new example
Downloading template "new-template" to create project "example" in example/ ...
The following parameters were needed by the template but not provided: author-email, author-name, category, copyright, github-username
You can provide them in /root/.stack/config.yaml, like this:
templates:
params:
author-email: value
author-name: value
category: value
View repo_util.py
import json
import requests
# only care about manifest list or v2 manifests
manifest_header = ' '.join([
'application/vnd.docker.distribution.manifest.list.v2+json',
'application/vnd.docker.distribution.manifest.v2+json'])
View gist:ad86f1a4da55b15eab6687951cfd8311
$ docker stack deploy --compose-file docker-compose.yml vossibility
Creating service vossibility_nsqd
Creating service vossibility_logstash
Updating service vossibility_elasticsearch (id: iz61zlud8zlhcq1z5xqzfe1rj)
Updating service vossibility_kibana (id: x1ohux8tv5v5e8mrsb8mae6n9)
Creating service vossibility_ghollector
Creating service vossibility_lookupd
$ docker stack ls
NAME SERVICES
vossibility 6
View gist:888dbf68cdd270da35a8b92923d7f44f
# DOCKER DOCKER DOCKER
app-emulation/docker btrfs container-init
>=sys-libs/libseccomp-2.2.3 static-libs
sys-process/tini static
@psftw
psftw / gist:cb954dfa4006dd610f8d
Created Nov 25, 2015
bashbrew list and hub sync
View gist:cb954dfa4006dd610f8d
1. docker pull a bunch of official repos
$ ./bashbrew.sh list --uniq debian ubuntu alpine ...
Tag not found:
java:openjdk-7u91-jdk
java:openjdk-7u91-jre
2. remove "--uniq" and docker pull again