Skip to content

Instantly share code, notes, and snippets.

View jamescallumyoung's full-sized avatar

James Young jamescallumyoung

View GitHub Profile
@jamescallumyoung
jamescallumyoung / lizzy--set-up-ts-project.sh
Created April 5, 2024 22:21
Set up a TS project, for Lizzy.
# !!!!!!! put your project name in the quotes below
# !!!!!!! it should be lowercase, start with a letter, and not include spaces
PROJ_NAME="projectname"
# create a directory for the project
mkdir -p ./$PROJ_NAME
# change to the new directory
cd ./$PROJ_NAME
@jamescallumyoung
jamescallumyoung / init-yarn-modern.sh
Last active April 5, 2024 17:10
Init a Yarn Modern project, with Corepack.
# exit if any command fials
set -e
## Skipping: doesn't work is `nvm` is evalcached
## also, can be surprisign if the user doesn't expect their node version to change
##
## # use the latest version of node
## nvm use --lts
# save the current (latest) node version so nvm can select it in the future
@jamescallumyoung
jamescallumyoung / delete-yarn-classic-global-files.sh
Created April 5, 2024 16:47
Remove Node versions installed by NVM.
# This script removes the Yarn Classic "global folder" which houses globally installed packages, installed by Yarn Classic.
# Note: Yarn Modern does not use this folder.
# TEST THIS
rm -rf $(yarn global bin)/..
@jamescallumyoung
jamescallumyoung / docker-nuke.sh
Last active May 26, 2020 10:35
Delete all docker containers and images
#! /bin/bash
STATUS=0
while getopts f C
do
case "$C" in
"f")
echo -n "Killing all running docker containers..."
if docker kill $(docker ps -q) 2> /dev/null ; then

Keybase proof

I hereby claim:

  • I am jamescallumyoung on github.
  • I am jych (https://keybase.io/jych) on keybase.
  • I have a public key ASAo35XZeTTXEF5C3cJdvyZ3Z0gjywIocNvI7nDbpTcSJAo

To claim this, I am signing this object: