- asciinema: brew install asciinema
- svg-term-cli: npm install -g svg-term-cli
asciinema rec
When done type exit
and save locally ctrl+d
mkcert
is an incredibly useful toolbrew install mkcert
#!/bin/sh | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'master$\|develop$'); do | |
if ! ( [[ -f "$branch" ]] || [[ -d "$branch" ]] ) && [[ "$(git log $branch --since "6 month ago" | wc -l)" -eq 0 ]]; then | |
local_branch_name=$(echo "$branch" | sed 's/remotes\/origin\///') | |
git branch -d "${local_branch_name}" | |
echo "${local_branch_name}" | |
git push origin --delete "${local_branch_name}" | |
fi | |
done |
version: 2.1 | |
# Use CircleCI's dynamic configuration feature | |
setup: true | |
# Orbs are built in helpers made by CircleCI & the community | |
orbs: | |
# Path iltering is the magic behind checking for file changes and leverages continuation orb to proceed with workflows | |
path-filtering: circleci/path-filtering@0.0.2 |
id - this has to match the id from the mount secret command src - path to file locally docker build --no-cache . -t test-backend --secret id=npmrc,src=backend/.npmrc --file backend/dockerfile
## Mount secrets commannd
Part of the docker build kit, enabled by default
A way of securely mounting secrets
The secret will not be in the final image, one to use for example performing the command npm ci
.
# Stage 1 - Install dependencies & build react assets | |
FROM node:14-alpine@sha256:0c80f9449d2690eef49aad35eeb42ed9f9bbe2742cd4e9766a7be3a1aae2a310 AS build | |
WORKDIR /usr/src/app | |
ENV NODE_ENV=production | |
COPY package*.json /usr/src/app/ | |
RUN npm i -g npm@7.20.0 | |
# mount a secret i.e. a custom nprc for private repos to be used for the npm clean install command only |
SHELL:=/usr/bin/env bash #default shell used | |
MAKEFLAGS += --silent --jobs 10 #don't echo commands and parallelise | |
# Default task executed when running with make command only no args | |
default: help | |
#src: https://victoria.dev/blog/how-to-create-a-self-documenting-makefile/ | |
help: ## Show this help | |
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' |
I hereby claim:
{
"body": {
"key": {
# install for mac via brew | |
$ brew install --cask 1password-cli | |
# sign in via cmd line | |
# You will need your secret key generated see 1password website: https://support.1password.com/secret-key/ | |
# followed by password | |
$ op signin subdomain.1password.com user@domain.com | |
# alias into bash_profile for ease sake | |
$ alias 1pws='eval $(op signin subdomain)' |