View Dockerfile
FROM alpine:3.12 | |
RUN apk add --update --no-cache openssl | |
WORKDIR /src | |
COPY . . | |
WORKDIR /dest | |
ARG KEY | |
ENV KEY=${KEY} | |
# compress them && | |
RUN tar -C /src -cvzf clear.tgz . &&\ | |
openssl enc -aes-256-cbc -in clear.tgz -out notclear.tgz.enc -pass env:KEY && \ |
View config.yaml
projects: | |
- name: PROJA | |
owner: myteam | |
repositories: | |
- name: kito | |
- name: bito | |
- name: IDEAS | |
owner: myteam | |
repositories: | |
- name: ideas |
View Jenkinsfile.groovy
pipeline { | |
agent any | |
stages { | |
stage('Build') { | |
parallel { | |
stage("build-ui") { | |
agent { |
View offline_pull_images
#!/bin/bash | |
echo "If you want to make quay.io/coreos/flannel:v0.11.0-amd64 available in the machine :" | |
echo "- Example Run : ${0} quay.io/coreos/flannel/v0.11.0-amd64" | |
echo "- Example Run : ${0} myapp-pod.yaml " | |
echo "- Example Run : ${0} http://some.thing/myapp-pod.yaml " | |
private_registry=${2} | |
regex_remote='^(https?|ftp)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]\.[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]$' |
View ReadVaultSecret.groovy
#!/usr/bin/env groovy | |
def call(body){ | |
def config = [:] | |
body.resolveStrategy = Closure.DELEGATE_FIRST | |
body.delegate = config | |
body() | |
def splited = config.secretPath.split('@') | |
def chartPath = config.chartPath |
View haskell.js
function _(...fns) { | |
return x => fns.reverse().reduce((reduced, f ) => f(reduced), x ) | |
} | |
const sum = arr => arr.reduce((a, b) => a + b, 0 ) | |
const filter = (fn, arr) => arr === undefined ? b => filter(fn, b) : arr.filter(fn) | |
// export |
View add-repo-to-nexus.sh
for i in {1..4}; do | |
f=.nexus-init/0${i}.json | |
curl -vX POST -u admin:admin123 \ | |
http://localhost:8081/service/rest/beta/repositories/maven/proxy \ | |
-d @${f} -H "Content-Type: application/json" | |
done |
View ubuntu-vnc-desktop.sh
#!/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 |
View 00-vault-up.sh
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 |
View convert.sh
# Convert a DER file (.crt .cer .der) to PEM | |
openssl x509 -inform der -in certificate.cer -out certificate.pem |