This file contains hidden or 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
COPY_TEMPLATE = """\ | |
#!/bin/bash | |
FROM_PATH="$PWD/{copy_from}" | |
TO_PATH="$BUILD_WORKSPACE_DIRECTORY/{to}/" | |
echo "Copying from $FROM_PATH to $TO_PATH" | |
cp -f $FROM_PATH $TO_PATH | |
""" |
This file contains hidden or 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 | |
set -euo pipefail | |
cd $(bazel info workspace) | |
WORKSPACE_NAME=$(basename $PWD) | |
cat << EOF > ./.project | |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> |
This file contains hidden or 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
SERVICE_ACCOUNT_DIR="/var/run/secrets/kubernetes.io/serviceaccount" | |
KUBERNETES_SERVICE_SCHEME=$(case $KUBERNETES_SERVICE_PORT in 80|8080|8081) echo "http";; *) echo "https"; esac) | |
KUBERNETES_SERVER_URL="$KUBERNETES_SERVICE_SCHEME"://"$KUBERNETES_SERVICE_HOST":"$KUBERNETES_SERVICE_PORT" | |
KUBERNETES_CLUSTER_CA_FILE="$SERVICE_ACCOUNT_DIR"/ca.crt | |
KUBERNETES_NAMESPACE=$(cat "$SERVICE_ACCOUNT_DIR"/namespace) | |
KUBERNETES_USER_TOKEN=$(cat "$SERVICE_ACCOUNT_DIR"/token) | |
KUBERNETES_CONTEXT="inCluster" | |
mkdir -p "$HOME"/.kube | |
cat << EOF > "$HOME"/.kube/config |
This file contains hidden or 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 | |
set -eo pipefail | |
PATTERN=${1} | |
SELECTED_PROFILE=$(cat ~/.aws/config | awk '/\[.+\]/{ gsub(/(\[profile[ ]+|\])/, ""); print }' \ | |
| fzf-tmux --height 30% --reverse -1 -0 --header 'Select AWS profile' --query "$PATTERN") | |
aws sso login --profile "$SELECTED_PROFILE" |
This file contains hidden or 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 os | |
from urllib.parse import urljoin | |
import urllib | |
import gzip | |
from pathlib import Path, PurePath | |
import requests | |
from bs4 import BeautifulSoup | |
NOTEBOOK_DIR = os.getcwd() | |
REPODATA_DIR = Path(NOTEBOOK_DIR) / "repodata" |
OlderNewer