Skip to content

Instantly share code, notes, and snippets.

@kreig303
kreig303 / stop-the-sha-swap.md
Last active January 1, 2023 10:24
stop lockfile sha-swapping! [npm]

hocus pocus to stop “sha-swapping” in lockfiles below

% git checkout branch-you-working-on
% rm -rf node_modules
% npm cache clean -f
% npm i

this should stop that sha1 <-> sha512 crap from happening to your local lockfiles when you do a random npm i after pulling/rebasing a branch.

@kreig303
kreig303 / README.md
Created March 3, 2020 14:24 — forked from DirtyF/README.md
Setup Jekyll on macOS with brew and rbenv - See https://jekyllrb.com/docs/installation/macos/

First, make sure you have command line tools installed:

xcode-select --install

Then open Terminal.app and type:

curl https://gist.githubusercontent.com/DirtyF/5d2bde5c682101b7b5d90708ad333bf3/raw/fbc736fa1b50bd637929a315e6803df306c8bc8e/setup-rbenv.sh | bash
@kreig303
kreig303 / gpgsignfalse.sh
Created February 26, 2020 16:02
avoiding gpg signing for specific repos
% git config commit.gpgsign false # Sets local option.
@kreig303
kreig303 / gpg-zsh.md
Last active February 22, 2020 15:34
set up zsh to use gpg to sign commits for github
# Install GnuPG
% brew install gnupg
% gpg --full-generate-key
# RSA and DSA/4096 bytes/Never expires
# enter name
# noreply from emails settings in gh if anon commits, otherwise primary email
# empty comment
# secure passphrase
# bang on keyboard to randomize key
@kreig303
kreig303 / gitflow-breakdown.md
Created June 27, 2019 18:36 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@kreig303
kreig303 / shell-out.ps1
Last active April 26, 2024 03:05
Powershell aliases for git and npm
##
# POWERSHELL SPECIFIC
##
Set-Alias clr clear # slight contraction of clear command
function brc { Start notepad "C:\Users\kzimmerman012\Documents\PowerShell\profile.ps1" } # for editing this file
function Reload-PowerShell { Start-Process pwsh; exit } # reload PowerShell Core
Set-Alias relo Reload-PowerShell
function lw { dir | fw } # wide listing
function up { cd .. } # better back
function rmraf { Remove-Item -Recurse -Force $args[0] }
@kreig303
kreig303 / git-tag-delete-local-and-remote.sh
Last active December 23, 2019 15:47 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag
git tag -d tagName
# delete remote tag
git push origin :refs/tags/tagName
# or
git push --delete origin tagName

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

Looking for npm scripts for AWS ECS? Go here!

Watch the video: Do More With Less JavaScript

Docker Containers for Static or Angular/React/Vue/etc SPA Websites

@kreig303
kreig303 / docker_kill.sh
Created May 21, 2019 16:53 — forked from evanscottgray/docker_kill.sh
kill all docker containers at once...
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt
@kreig303
kreig303 / gitBash_windows.md
Created May 21, 2019 15:51 — forked from evanwill/gitBash_windows.md
how to add more utilities to git bash for windows, wget, make

How to add more to Git Bash on Windows

Git for Windows comes bundled with the "Git Bash" terminal which is incredibly handy for unix-like commands on a windows machine. It is missing a few standard linux utilities, but it is easy to add ones that have a windows binary available.

The basic idea is that C:\Program Files\Git\mingw64\ is your / directory according to Git Bash (note: depending on how you installed it, the directory might be different. from the start menu, right click on the Git Bash icon and open file location. It might be something like C:\Users\name\AppData\Local\Programs\Git, the mingw64 in this directory is your root. Find it by using pwd -W). If you go to that directory, you will find the typical linux root folder structure (bin, etc, lib and so on).

If you are missing a utility, such as wget, track down a binary for windows and copy the files to the corresponding directories. Sometimes the windows binary have funny prefixes, so