- Add this to your .rc file
preexec () {
(( $#_elapsed > 1000 )) && set -A _elapsed $_elapsed[-1000,-1]
typeset -ig _start=SECONDS
}
# Notify about long running commands
function precmd() {
{ | |
"artifacts": [ | |
{ | |
"id": "55b15606ad877995", | |
"name": "adduser", | |
"version": "3.115", | |
"type": "deb", | |
"foundBy": "dpkgdb-cataloger", | |
"locations": [ | |
{ |
{ | |
"artifacts": [ | |
{ | |
"id": "55b15606ad877995", | |
"name": "adduser", | |
"version": "3.115", | |
"type": "deb", | |
"foundBy": "dpkgdb-cataloger", | |
"locations": [ | |
{ |
#!/bin/sh | |
sudo apt-get -y install awscli | |
export AWS_DEFAULT_REGION=$( curl -s http://169.254.169.254/latest/meta-data/placement/region ) | |
EFS_ID=$( aws ssm get-parameter --name dev_efs_id --output text --query 'Parameter.Value' ) | |
ACCESS_POINT_DATA=$( aws ssm get-parameter --name dev_efs_data_ap --output text --query 'Parameter.Value' ) | |
EFS_MOUNT_AZ=$( aws ssm get-parameter --name dev_efs_az --output text --query 'Parameter.Value' ) | |
IP_ALLOC_ID=$( aws ssm get-parameter --name dev_ip_allocation_id --output text --query 'Parameter.Value' ) | |
SSH_PUBLIC_KEY=$( aws ssm get-parameter --name dev_ssh_key --output text --query 'Parameter.Value' ) |
preexec () {
(( $#_elapsed > 1000 )) && set -A _elapsed $_elapsed[-1000,-1]
typeset -ig _start=SECONDS
}
# Notify about long running commands
function precmd() {
{"test":"cool"} |
#!/bin/sh | |
# This is a secret decryption script that will decrypt ejson-kms secrets and | |
# export them to the shell environment. | |
# | |
# It expects two sane defaults: | |
# 1. That $ENV has been set already, so that we know which environment we're in | |
# and what secrets to export. | |
# 2. That the location of your secrets are either relative at | |
# _infra/secrets/$ENV.json or absolutely located at /opt/_infra/secrets/$ENV.json. |
#!/bin/sh | |
set -eo pipefail | |
# get ejson2env | |
wget -q https://gist.github.com/noqcks/88304840eb85e6d7ac6d3dcfe1fa9bc4/raw/e8d7beaa89ec8a819489852d023dc641b027748c/ejson2env | |
chmod +x ejson2env | |
mv ejson2env /usr/bin/ejson2env | |
# exit if $ENV doesn't exist. Not sure what environment to decrypt! |
package main | |
// the equivalent of kubectl set image deployment/api api="image" | |
import ( | |
"fmt" | |
patchtype "k8s.io/apimachinery/pkg/types" | |
"k8s.io/client-go/kubernetes" | |
_ "k8s.io/client-go/plugin/pkg/client/auth/oidc" | |
"k8s.io/client-go/rest" |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: airflow-scheduler | |
namespace: airflow | |
--- | |
# Allows Airflow to grab config maps (airflow.cfg) | |
kind: RoleBinding | |
apiVersion: rbac.authorization.k8s.io/v1 |