Optional switches:
-
--PARAMETER_HANDLER_PRINT_VALUES value
default value F
Print parameter handler values after parsing the command line interface -
--ENVIRONMENT_NUM_LEVELS value
#/usr/bin/env bash | |
_completion() | |
{ | |
cur=${COMP_WORDS[COMP_CWORD]} | |
prev=${COMP_WORDS[COMP_CWORD - 1]} | |
if [ $COMP_CWORD -eq 1 ]; then | |
# initialize groups array with all available groups | |
groups=( "compile" "clean" ) | |
default_clas=( "--help" "-h" "--version" "-v" ) |
# install mkl | |
RUN apt update && apt install -y --force-yes apt-transport-https && \ | |
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB && \ | |
sh -c 'echo deb https://apt.repos.intel.com/mkl all main > /etc/apt/sources.list.d/intel-mkl.list' && \ | |
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install cpio intel-mkl-64bit-2018.3-051 && \ | |
(find /opt/intel -name "ia32*" -exec rm -rf {} \; || echo "removing ia32 binaries") ; \ | |
(find /opt/intel -name "examples" -type d -exec rm -rf {} \; || echo "removing examples") ; \ | |
(find /opt/intel -name "benchmarks" -exec rm -rf {} \; || echo "removing benchmarks") ; \ | |
(find /opt/intel -name "documentation*" -exec rm -rf {} \; || echo "removing documentation") ; \ |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="/socket.io/socket.io.js"></script> | |
<script> | |
(function () { | |
var onMessage = function (data) { | |
// Do something with the message data | |
}; |
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
#!/usr/bin/env python26 | |
import logging | |
import pika | |
logging.basicConfig() | |
class Consumer(object): | |
""" | |
A RabbitMQ topic exchange consumer that will call the specified function |
from multiprocessing.process import Process | |
import time | |
import redis | |
def pub(myredis): | |
for n in range(10): | |
myredis.publish('channel','blah %d' % n) | |
time.sleep(5) | |
def sub(myredis, name): |
import redis | |
import threading | |
class Listener(threading.Thread): | |
def __init__(self, r, channels): | |
threading.Thread.__init__(self) | |
self.redis = r | |
self.pubsub = self.redis.pubsub() | |
self.pubsub.subscribe(channels) | |
require 'omniauth-oauth2' | |
# this OmniAuth-Strategy uses the Keyrock Identity Management | |
# see http://catalogue.fiware.org/enablers/identity-management-keyrock | |
# The server url is from the public FIWARE Lab instance. | |
module OmniAuth | |
module Strategies | |
class FilabStrategy < OmniAuth::Strategies::OAuth2 | |
option :name, "filab" | |
option :client_options, { |