Skip to content

Instantly share code, notes, and snippets.

def verify_services():
host = 'labratfinder.com'
user = app.config['SERVER_USER']
port = app.config['SERVER_PORT']
key_filename = app.config['SERVER_KEY_PATH']
timeout = 60
es_host = 'es.labratfinder.com'
es_user = app.config['ES_SERVER_USER']
es_port = app.config['ES_SERVER_PORT']
nginx_1 | 172.18.0.1 - - [02/Jul/2020:16:39:14 +0000] "GET / HTTP/1.1" 200 541 "-" "Python-urllib/3.7" "-"
db_1 | 2020-07-02 16:39:15.983 UTC [1] LOG: received smart shutdown request
db_1 | 2020-07-02 16:39:15.985 UTC [1] LOG: background worker "logical replication launcher" (PID 33) exited with exit code 1
scrapyd_1 | Jul 2 16:39:15 15b8bd522631 chaperone[1]: Request made to kill system.
scrapyd_1 | Jul 2 16:39:15 15b8bd522631 chaperone[1]: still have 1 waiting, sleeping for shutdown_timeout=8
scrapyd_1 | Jul 2 16:39:15 15b8bd522631 chaperone[1]: REAP pid=28,status=15
scrapyd_1 | Jul 2 16:39:15 15b8bd522631 chaperone[1]: REAP pid=0,status=0
scrapyd_1 | Jul 2 16:39:15 15b8bd522631 chaperone[1]: scrapyd.service exit status for pid=28 is '<ProcStatus signal=15>'
redis_db_1 | 1:signal-handler (1593707955) Received SIGTERM scheduling shutdown...
api_1 | 2020-07-02 16:39:15,995 WARN received SIGTERM indicating exi
@JonniK
JonniK / docker-cleanup-resources.md
Created May 25, 2018 20:21 — 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

@JonniK
JonniK / gist:4fa7cd2743740d217e2589af556a8f3c
Created April 27, 2018 10:10 — forked from belsrc/gist:672b75d1f89a9a5c192c
Simple Vue.js filters that I usually need
/**
* Changes value to past tense.
* Simple filter does not support irregular verbs such as eat-ate, fly-flew, etc.
* http://jsfiddle.net/bryan_k/0xczme2r/
*
* @param {String} value The value string.
*/
Vue.filter('past-tense', function(value) {
// Slightly follows http://www.oxforddictionaries.com/us/words/verb-tenses-adding-ed-and-ing
var vowels = ['a', 'e', 'i', 'o', 'u'];
@JonniK
JonniK / gist:8e543a998f43f2ec591acb8c93eee6f7
Created April 27, 2018 10:08 — forked from cgmartin/gist:5880732
WebSocket subprotocol and origin validation with HTTP Kit
(ns my.server
(:use org.httpkit.server
[clojure.string :only [split trim lower-case]])
(:import [org.httpkit.server AsyncChannel]))
(defn origin-match? [origin-re req]
(if-let [req-origin (get-in req [:headers "origin"])]
(re-matches origin-re req-origin)))
0xBA949487B544097A9F041c4db329559ab72C18d0
0xDF0b17ae5bF70bC47a652F840c2f9E8445b67f0D