load-vault-path-into-files.sh secret/keys/tls/example.com
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 | |
sudo apt-get update -y | |
sudo apt-get install ubuntu-desktop -y | |
sudo apt-get install tightvncserver -y | |
sudo apt-get install gnome-panel gnome-settings-daemon -y | |
sudo apt-get install metacity nautilus gnome-terminal gnome-shell -y | |
# sudo apt-get install ubuntu-gnome-desktop -y | |
cat > ~/.vnc/xstartup <<EOF | |
#!/bin/sh | |
export XKL_XMODMAP_DISABLE=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
sudo apt-get install poppler-utils -y |
-
Ctrl+B
, then%
=> split window vertifcally -
Ctrl+B
, then"
=> split window horiztionally -
Ctrl+B
, theno
=> Move cursor among panes
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
# Credit: https://stackoverflow.com/a/61685899/747579 | |
SVCRANGE=$(echo '{"apiVersion":"v1","kind":"Service","metadata":{"name":"tst"},"spec":{"clusterIP":"1.1.1.1","ports":[{"port":443}]}}' | kubectl apply -f - 2>&1 | sed 's/.*valid IPs is //') | |
echo $SVCRANGE |
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
cat vault.hcl | |
# create data container which holds the hcl file | |
docker create -v /config --name config busybox; docker cp vault.hcl config:/config/; | |
docker exec -it config cat /config/vault.hcl | |
docker run -d --name consul -p 8500:8500 consul:v0.6.4 agent -dev -client=0.0.0.0 | |
docker run -d --name vault-dev --link consul:consul -p 8200:8200 --volumes-from config cgswong/vault:0.5.3 server -config=/config/vault.hcl | |
# docker run -d --name vault-dev --volumes-from config --cap-add=IPC_LOCK -e 'VAULT_LOCAL_CONFIG={"backend": {"file": {"path": "/config/vault.hcl"}}, "default_lease_ttl": "168h", "max_lease_ttl": "720h"}' --link consul:consul vault server |
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
FROM nginx:1.19-alpine-perl | |
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx | |
COPY my-nginx.conf.template /etc/nginx/templates/ |
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
FROM centos:latest | |
# 初始化文件夹 | |
RUN mkdir /www /www/server /www/wwwroot /www/env /www/bak /www/server/php74 /www/server/php56 /www/wwwroot/myapp \ | |
&& yum update -y \ | |
&& yum install -y nodejs zip unzip wget zsh vim make cmake gcc gcc-c++ libxml2 libxml2-devel git \ | |
nodejs zip unzip sqlite-devel m4 autoconf nginx tree \ | |
krb5-devel openssl openssl-devel curl curl-devel libjpeg \ | |
libjpeg-devel libpng libpng-devel freetype freetype-devel \ | |
pcre pcre-devel libxslt libxslt-devel bzip2 bzip2-devel \ |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: Pipeline env setup | |
Parameters: | |
OperatorEmail: | |
Description: "Email address to notify." | |
Type: String | |
Default: tsh-devops@xyz.com | |
ClusterSettingsArtifactFile: | |
Type: String | |
Default: cloudformation.zip |
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}" |