Skip to content

Instantly share code, notes, and snippets.

@d3vAdv3ntur3s
d3vAdv3ntur3s / Dockerfile
Created July 31, 2021 13:20
Dockerise React with NGNIX
# 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 [email protected]
# mount a secret i.e. a custom nprc for private repos to be used for the npm clean install command only
@d3vAdv3ntur3s
d3vAdv3ntur3s / config.yml
Created July 31, 2021 15:15
CircleCI Mono Repo Setup
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/[email protected]
@d3vAdv3ntur3s
d3vAdv3ntur3s / git_early_eof_error.md
Created October 28, 2021 13:11
Git early EOF (Error decoding the received TLS packet, index-pack failed) Issue

Git early EOF (Error decoding the received TLS packet, index-pack failed) Issue

git clone https://github.com/d3vadv3ntur3s/some-cool-repo.git
Cloning into 'some-cool-repo'...

remote: Enumerating objects: 145563, done.
@d3vAdv3ntur3s
d3vAdv3ntur3s / delete_branches.sh
Created January 13, 2022 12:19
Delete local & remote git branches after x months old
#!/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
@d3vAdv3ntur3s
d3vAdv3ntur3s / recording.md
Created May 11, 2022 10:54
github readme recording

Install

  • asciinema: brew install asciinema
  • svg-term-cli: npm install -g svg-term-cli

Run

asciinema rec

When done type exit and save locally ctrl+d