Creating a new app from Jumpstart Pro Rails Template:
take my_app
git init
git remote add upstream [email protected]:jumpstart-pro/jumpstart-pro-rails.git
#!/bin/bash | |
# | |
# Saves logs for all containers in a pod. | |
# | |
set -o nounset -o errexit -o pipefail | |
# Function to print the usage | |
usage() { | |
echo "Usage: $0 [-n namespace] <pod-name>" | |
exit 1 |
#!/bin/bash | |
# | |
# Adds a sidecar container running mitmproxy to a deployment resource. | |
# See https://mitmproxy.org | |
# | |
# The goal is to make it easier to inspect service-to-service HTTP requests in a dev, staging or QA environment. | |
# | |
# Not recommended for production usage since it can reveal secrets and it is an actual man-in-the-middle | |
# (https://owasp.org/www-community/attacks/Manipulator-in-the-middle_attack). | |
# |
Creating a new app from Jumpstart Pro Rails Template:
take my_app
git init
git remote add upstream [email protected]:jumpstart-pro/jumpstart-pro-rails.git
#!/bin/bash | |
# | |
# Backs up local folders to Google Drive. | |
# | |
# Run from a cron job script: ~/bin/backup-job | |
# | |
set -o nounset -o errexit -o pipefail | |
BACKUP_DIR="/Users/fernando.correia/Google Drive/My Drive/Backup" |
declare http_code | |
until [[ $http_code -eq 200 ]]; do | |
login_url="$HOST/login" | |
http_code=$(curl -I $login_url -o /dev/null -w '%{http_code}' -s) | |
if [[ $http_code -ne 200 ]]; then | |
echo "$login_url returned status code $http_code, sleeping for 10 secs" | |
sleep 10 | |
fi | |
done |
brew install libpq
gem install pg -v '1.2.3' --source 'https://rubygems.org/' -- --with-pg-config=/opt/homebrew/Cellar/libpq/13.2/bin/pg_config
#!/bin/bash | |
# | |
# Copies changed files to a remote server except the .git directory. | |
# | |
rsync -razvhPu -e ssh --exclude '.git' ~/Projects/forge fernando-box:/home/fedora |
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
#!/bin/bash | |
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/linux/amd64/kubectl | |
chmod +x kubectl | |
sudo mv kubectl /usr/local/bin/ |
#!/bin/bash | |
docker run -p 8888:8888 -v $(pwd):/home/jovyan/host jupyter/scipy-notebook |