docker run --rm -it --name web-client hamdifourati/curl su -c 'trap "exit 0" SIGTERM SIGKILL; tail -f /dev/null'
This file contains 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
#!/bin/bash | |
# usage: | |
# curl -s https://gist.githubusercontent.com/hamdifourati/2f940556f0ebfd68e932585c557623d9/raw/kube.sh | sudo bash | |
# | |
set -ex | |
DOCKER_VERSION=18.09.9~3-0 | |
CONTAINERD_VERSION=1.2.10-3 |
This file contains 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
#!/bin/bash | |
# Usage: | |
# curl -s https://gist.githubusercontent.com/hamdifourati/9efaba113bc4cc3423a1a93674335002/raw/google-cloud-sdk-debian.sh | sudo bash | |
# | |
set -ex | |
apt install apt-transport-https ca-certificates gnupg -y |
This file contains 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
#!/usr/bin/env python | |
""" | |
Copyright Google Inc. 2016 | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
This file contains 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
#!/bin/bash | |
set -ex | |
yum update -y | |
# install python3.6 | |
yum -y install yum-utils | |
yum -y groupinstall development | |
yum -y install https://centos7.iuscommunity.org/ius-release.rpm | |
yum -y install python36u |
docker run -it --rm -v $PWD:/app/ maven:3-jdk-8 su -c"cd /app && mvn archetype:generate -DgroupId=info.hamdifourati.helloworld -DartifactId=hello-world -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false"
This file contains 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
import os | |
import logging | |
# Use APP_ENV environment variable to determine app environment | |
# Default to `production` | |
APP_ENV = os.getenv('APP_ENV', 'production') | |
logging.basicConfig( | |
level=(logging.ERROR if APP_ENV is 'production' else logging.DEBUG ) |