Skip to content

Instantly share code, notes, and snippets.

View unicornware's full-sized avatar
🔥
getting busy with the keyboard

Lex unicornware

🔥
getting busy with the keyboard
View GitHub Profile
@unicornware
unicornware / .commitlintrc.json
Last active September 4, 2023 08:21
Repo Configuration Files
{
"extends": "@flex-development"
}
@unicornware
unicornware / repo-setup.md
Last active March 9, 2024 22:10
Repo Setup

Repo Setup

  1. Local setup
    • Replace project-name with project name (don't forget to skip this line 😉)
      • Run yarn afterwards to update lockfile
    • Commit scopes
      • Update .commitlintrc.*
    • Variables
      • Update .env.repo
  • Update .env.vars
@unicornware
unicornware / add-to-project.yml
Last active April 14, 2023 22:22
GitHub Workflows
# Add To Project
#
# Add new issues and pull requests to the project board.
#
# References:
#
# - https://docs.github.com/actions/learn-github-actions/contexts
# - https://docs.github.com/actions/learn-github-actions/expressions
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#issues
# - https://docs.github.com/actions/using-workflows/events-that-trigger-workflows#pull_request
@unicornware
unicornware / add-stream.d.ts
Last active February 19, 2023 23:25
Custom Typings - Changelog
declare module 'add-stream' {
import type { ReadStream, WriteStream } from 'node:fs'
/**
* Creates a transform stream that appends the contents of `stream` onto
* whatever is piped into it.
*
* @param {ReadStream} stream - Stream to append
* @return {WriteStream} Transform stream
*/
@unicornware
unicornware / pantheon-gitlab-workflow-setup.sh
Created May 19, 2022 02:52
Pantheon x GitLab Workflow Setup
#!/bin/sh
# PREREQUISITES
#
# 1. setup gpg for git
# - https://medium.com/@jma/setup-gpg-for-git-on-macos-4ad69e8d3733
# 2. install glab
# - https://github.com/profclems/glab#installation
# 3. install terminus
# - https://pantheon.io/docs/terminus/install
@unicornware
unicornware / macbook-setup.sh
Last active July 19, 2022 19:59
Macbook Setup Script
#!/bin/sh
# PREREQUISITES
# backup machine with current setup
# SETUP
# set environment variables
# export DOPPLER_CONFIG=
@unicornware
unicornware / .npmrc
Last active May 18, 2022 17:44
Package Manager Configurations
# NPM Configuration
# See: https://docs.npmjs.com/cli/v6/using-npm/config#npmrc-files
# See: https://stackoverflow.com/questions/53099434/using-auth-tokens-in-npmrc
# Registry Configuration - npm
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
registry=https://registry.npmjs.org/
# Registry Configuration - gpr / @flex-development scope
//registry.yarnpkg.com/:_authToken=${GH_PAT}
@unicornware
unicornware / System Design.md
Created March 24, 2022 06:33 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@unicornware
unicornware / .env
Last active January 31, 2022 07:10
Certbot x Google Cloud DNS - Local Machine to Project Directory & Local Machine to VM Transfers
# Environment Variables
CERTBOT_DOMAINS="*.$TLD,*.api.$TLD,*.db.$TLD,*.docs.$TLD,*.redis.$TLD"
CERTBOT_EMAIL=<email-address>
GCLOUD_PROJECT=<project-id>
TLD=<top-level-domain>
VM_IDENTITY_FILE=~/.ssh/ubuntu_rsa
VM_IP=<vm-static-ip>
VM_USER=ubuntu
@unicornware
unicornware / init.sh
Last active March 27, 2023 05:49
Virtual Machine Setup - Ubuntu LTS
#! /bin/sh
# Virtual Machine - Initialization Workflow
#
# Reserves a static IP address and creates a virtual machine instance.
#
# Creates record sets for $TLD, *.$TLD, and *.dev.$TLD afterwards.
#
# Prerequisites:
#