! this should be highlighted !
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 | |
# The set -e option instructs bash to immediately exit if any command has a non-zero exit status | |
# The set -u referencing a previously undefined variable - with the exceptions of $* and $@ - is an error | |
# The set -o pipefaile if any command in a pipeline fails, that return code will be used as the return code of the whole pipeline | |
# https://bit.ly/37nFgin | |
set -o pipefail | |
help_function() { | |
echo "Usage: __open_file.sh [query] [-h|--help]" |
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
function _G.yank_matching_lines() | |
local search_pattern = vim.fn.getreg('/') | |
if search_pattern ~= '' then | |
local matching_lines = {} | |
for line_number = 1, vim.fn.line('$') do | |
local line = vim.fn.getline(line_number) | |
if vim.fn.match(line, search_pattern) ~= -1 then | |
table.insert(matching_lines, line) | |
end | |
end |
With time the .kube/config file will contain a mix of dev, test and prod cluster references.
It is easy to forget switching off from a prod cluster context and make a mistake and run for example kubectl delete ns crossplane-system
.
Use the following setup to avoid these kinds of errors and keep clusters separate.
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 | |
# Find a repo for my user and cd into it, clone and cd if not found on disk | |
function repo() { | |
# If repo name not provided, prompt for it rather than error out | |
if [[ -z "$1" ]]; then | |
export repo=$(ghs -u Piotr1215 | sed 's:.*/::') | |
else | |
export repo=$(ghs -u Piotr1215 $1 | sed 's:.*/::') | |
fi |
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
# Detect operating system in Makefile. | |
# Author: He Tao | |
# Date: 2015-05-30 | |
OSFLAG := | |
ifeq ($(OS),Windows_NT) | |
OSFLAG += -D WIN32 | |
ifeq ($(PROCESSOR_ARCHITECTURE),AMD64) | |
OSFLAG += -D AMD64 | |
endif |
General purpose Ubuntu 20.04 Instance
curl -sfL https://get.k3s.io | sh -
Capability/Tool | terraform Cloud | terraform Enterprise | Scalr | Env0 | Spacelift |
---|---|---|---|---|---|
Compliance | ISO 27001, SOC 2 | ISO 27001, SOC 2 | ❓ | SOC 2 | ISO 27001, SOC 2 |
GitLab Integration | ✅ | ✅ | ✅ | ✅ | ✅ |
Hosting | SaaS | SaaS, On-Prem | SaaS, On-Prem | SaaS | SaaS |
Policy as Code | Sentinel |
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 -x | |
date | |
### 0. Install helm, kubectl (kubernetes-cli), and k3d with brew | |
brew install helm k3d kubectl | |
### 1. Create a cluster with k3d that connects port 443 to the loadbalancer provided by k3d | |
# Optionally install with more agents `--agents 3` | |
k3d cluster create k3d-rancher \ | |
--api-port 6550 \ |
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
trigger: | |
branches: | |
include: | |
- master | |
paths: | |
exclude: | |
# Exclude README.md from triggering content deployments | |
- README.md |
NewerOlder