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/sh | |
echo "hello, skills!" | |
date -u "$@" |
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
# alias k for kubectl | |
# usage: k KUBECTL_ARGS... | |
function k () { | |
kubectl "$@" | |
} | |
# print or switch kubectl kubeconfig contexts | |
# usage: kc [MATCH_REGEXP] | |
function kc () | |
{ |
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 | |
# test kaniko under gvisor | |
declare Pkg=kgtest | |
declare Version=0.1.0 | |
set -o pipefail | |
# usage: msg MSG | |
function msg () { |
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
import * as k8s from "@kubernetes/client-node"; | |
import { DeepPartial } from "ts-essentials"; | |
const serviceAccount: DeepPartial<k8s.V1ServiceAccount> = { | |
apiVersion: "v1", | |
kind: "ServiceAccount", | |
metadata: { | |
name: "noaccess", | |
}, | |
}; | |
const role: DeepPartial<k8s.V1Role> = { |
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 | |
# link-image post one-liner for codeship | |
# Codeship sets CI_REPO_NAME and CI_COMMIT_ID, you must set DOCKER_IMAGE and ATOMIST_TEAM | |
# ATOMIST_TEAM should be your Atomist workspace/team ID | |
curl -s -f -X POST -H "Content-Type: application/json" \ | |
--data-binary "{\"git\":{\"owner\":\"${CI_REPO_NAME%/*}\",\"repo\":\"${CI_REPO_NAME#*/}\",\"sha\":\"$CI_COMMIT_ID\"},\"docker\":{\"image\":\"$DOCKER_IMAGE\"},\"type\":\"link-image\"}" \ | |
https://webhook.atomist.com/atomist/link-image/teams/$ATOMIST_TEAM | |
# Or, if you prefer to call a function, use this instead |
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 | |
# function to make a commit on a branch in a Travis CI build | |
# be sure to avoid creating a Travis CI fork bomb | |
# see https://github.com/travis-ci/travis-ci/issues/1701 | |
function travis-branch-commit() { | |
local head_ref branch_ref | |
head_ref=$(git rev-parse HEAD) | |
if [[ $? -ne 0 || ! $head_ref ]]; then | |
err "failed to get HEAD reference" | |
return 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
# Set up the path to the local repository | |
local-repository: | |
path: "${user.home}/.atomist/repository" | |
# Set up remote repositories to query for Rug archives. Additionally one of the | |
# repositories can also be enabled for publication (publish: true). | |
remote-repositories: | |
maven-central: | |
publish: false | |
url: "http://repo.maven.apache.org/maven2/" |
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
# Set up the path to the local repository | |
local-repository: | |
path: "${user.home}/.atomist/repository" | |
# Set up remote repositories to query for Rug archives. Additionally one of the | |
# repositories can also be enabled for publication (publish: true). | |
remote-repositories: | |
maven-central: | |
publish: false | |
url: "http://repo.maven.apache.org/maven2/" |
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
# bash kubernetes functions | |
# kubectl with kubeconfig | |
function k () { | |
kubectl --kubeconfig=kubeconfig "$@" | |
} | |
# exec shell in pod | |
function k8sh () { | |
local p="$1" | |
shift |
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 | |
# Fetch 24-hour AWS STS session token and set appropriate environment variables. | |
# See http://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html . | |
# You must have jq installed and in your PATH https://stedolan.github.io/jq/ . | |
# Add this function to your .bashrc or save it to a file and source that file from .bashrc . | |
# https://gist.github.com/ddgenome/f13f15dd01fb88538dd6fac8c7e73f8c | |
# | |
# usage: aws-creds MFA_TOKEN [OTHER_AWS_STS_GET-SESSION-TOKEN_OPTIONS...] | |
function aws-creds () { | |
local pkg=aws-creds |
NewerOlder