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
# yum localinstall redhat* | |
Loaded plugins: fastestmirror, refresh-packagekit, security | |
Existing lock /var/run/yum.pid: another copy is running as pid 7591. | |
Another app is currently holding the yum lock; waiting for it to exit... | |
The other application is: PackageKit | |
Memory : 39 M RSS (348 MB VSZ) | |
Started: Tue May 19 17:04:57 2015 - 06:29 ago | |
State : Sleeping, pid: 7591 | |
Another app is currently holding the yum lock; waiting for it to exit... | |
The other application is: PackageKit |
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
- create s3 bucket, for example: react. | |
- create cloudfront distributions with these settings: | |
- Default Root Object: index.html | |
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com | |
- add custom error page with these settings: | |
- HTTP Error Code: 403: Forbidden | |
- Customize Error Response: Yes | |
- Response Page Path: /index.html | |
- HTTP Response Code: 200: OK | |
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 bash | |
set -eu | |
# PATH TO YOUR HOSTS FILE | |
: ${ETC_HOSTS="/etc/hosts"} | |
# DEFAULT IP FOR HOSTNAME | |
DEFAULT_IP="127.0.0.1" |
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
version: "3" | |
networks: | |
chat: | |
services: | |
# Launch the Redis used for syncing messages between copies of the client app | |
redis: | |
image: redis | |
networks: | |
- chat |
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
# Root. | |
$ docker exec -u 0 i -t {container_id/image_name} bash | |
or | |
# Default container's user. | |
$ docker exec i -t {container_id/image_name} bash |
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
console.log('Loading function'); | |
const https = require('https'); | |
const url = require('url'); | |
// to get the slack hook url, go into slack admin and create a new "Incoming Webhook" integration | |
const slack_url = 'https://hooks.slack.com/services/...'; | |
const slack_req_opts = url.parse(slack_url); | |
slack_req_opts.method = 'POST'; | |
slack_req_opts.headers = {'Content-Type': 'application/json'}; |
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
Master - jenkins-master-docker-compose.yml | |
jenkins_app: | |
image: jenkins:2.60.1 | |
container_name: jenkins_master | |
restart: always | |
ports: | |
- "80:8080" |
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
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
cat <<EOF > /etc/apt/sources.list.d/kubernetes.list | |
deb http://apt.kubernetes.io/ kubernetes-xenial main | |
EOF | |
apt-get update | |
apt-get install -y docker.io kubelet kubeadm kubectl kubernetes-cni |
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 bash | |
VERSION="$1" | |
VERSION="${VERSION#[vV]}" | |
VERSION_MAJOR="${VERSION%%\.*}" | |
VERSION_MINOR="${VERSION#*.}" | |
VERSION_MINOR="${VERSION_MINOR%.*}" | |
VERSION_PATCH="${VERSION##*.}" | |
echo "Version: ${VERSION}" |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Effect": "Allow", | |
"Action": "s3:ListAllMyBuckets", | |
"Resource": "arn:aws:s3:::MyBucketName" | |
}, | |
{ | |
"Action": [ |
OlderNewer