From fe43fd42d6b1aee08eeef4be35d196654cbbbea5 Mon Sep 17 00:00:00 2001 From: Tim Smith <69870077+timscodebase@users.noreply.github.com> Date: Fri, 30 Sep 2022 08:04:40 -0700 Subject: [PATCH 1/6] NPM Workflows --- .../npm/find_and_delete_node_modules_in_a_folder.yaml | 11 +++++++++++ ...l_directories_with_node_modules_and_show_them.yaml | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 specs/npm/find_and_delete_node_modules_in_a_folder.yaml create mode 100644 specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml diff --git a/specs/npm/find_and_delete_node_modules_in_a_folder.yaml b/specs/npm/find_and_delete_node_modules_in_a_folder.yaml new file mode 100644 index 0000000..edb7f35 --- /dev/null +++ b/specs/npm/find_and_delete_node_modules_in_a_folder.yaml @@ -0,0 +1,11 @@ +--- +name: Find and delete node_modules in a folder +command: find . -name 'node_modules' -type d -prune -print -exec rm -rf '{}' \; +tags: + - npm +description: Finds and deletes all node_modules in a folder +arguments: [] +source_url: "https://stackoverflow.com/questions/22675725/find-unused-npm-packages-in-package-json" +author: Tim Smith +author_url: "https://timsmith.tech" +shells: [] diff --git a/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml new file mode 100644 index 0000000..0046edd --- /dev/null +++ b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml @@ -0,0 +1,11 @@ +--- +name: Finds and all node_modules in a folder +command: find . -name "node_modules" -type d -prune -print | xargs du -chs +tags: + - npm +description: Finds and all node_modules in a folder and displays information about them +arguments: [] +source_url: "https://stackoverflow.com/questions/22675725/find-unused-npm-packages-in-package-json" +author: Tim Smith +author_url: "https://timsmith.tech" +shells: [] From 4a2cb38a46703d23615a79c0e7c69f1332b372d2 Mon Sep 17 00:00:00 2001 From: Tim Smith <69870077+timscodebase@users.noreply.github.com> Date: Fri, 30 Sep 2022 08:46:07 -0700 Subject: [PATCH 2/6] github ssh --- specs/ssh/copy_ssh_key_for_github.yaml | 14 ++++++++++++++ specs/ssh/generate_new_ssh_key_for_github.yaml | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 specs/ssh/copy_ssh_key_for_github.yaml create mode 100644 specs/ssh/generate_new_ssh_key_for_github.yaml diff --git a/specs/ssh/copy_ssh_key_for_github.yaml b/specs/ssh/copy_ssh_key_for_github.yaml new file mode 100644 index 0000000..5d30918 --- /dev/null +++ b/specs/ssh/copy_ssh_key_for_github.yaml @@ -0,0 +1,14 @@ +--- +name: Copy SSH key for GitHub +command: "pbcopy < ~/.ssh/id_ed25519.pub" +tags: + - npm +description: "Copies the SSH key for GitHub to the clipboard. This is useful for adding the SSH key to GitHub." +arguments: + - name: email + description: "Your email address. This is used to identify the key." + default_value: ~ +source_url: "https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account" +author: Tim Smith +author_url: "https://timsmith.tech" +shells: [] \ No newline at end of file diff --git a/specs/ssh/generate_new_ssh_key_for_github.yaml b/specs/ssh/generate_new_ssh_key_for_github.yaml new file mode 100644 index 0000000..3c29c19 --- /dev/null +++ b/specs/ssh/generate_new_ssh_key_for_github.yaml @@ -0,0 +1,14 @@ +--- +name: Generate new SSH key for GitHub +command: "ssh-keygen -t ed25519 -C \"{{email}}\"" +tags: + - npm +description: "Generates a new SSH key for GitHub. The email address is optional. If you don't specify an email address, you'll be prompted to enter one." +arguments: + - name: email + description: "Your email address. This is used to identify the key." + default_value: ~ +source_url: "https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" +author: Tim Smith +author_url: "https://timsmith.tech" +shells: [] \ No newline at end of file From e8c8e9aebafc0acf7c2911f75d3a30b1827d6a13 Mon Sep 17 00:00:00 2001 From: Tim Smith <69870077+timscodebase@users.noreply.github.com> Date: Fri, 30 Sep 2022 08:48:28 -0700 Subject: [PATCH 3/6] npm updates --- specs/npm/find_and_delete_node_modules_in_a_folder.yaml | 2 +- ...ook_for_all_directories_with_node_modules_and_show_them.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/npm/find_and_delete_node_modules_in_a_folder.yaml b/specs/npm/find_and_delete_node_modules_in_a_folder.yaml index edb7f35..f366c61 100644 --- a/specs/npm/find_and_delete_node_modules_in_a_folder.yaml +++ b/specs/npm/find_and_delete_node_modules_in_a_folder.yaml @@ -5,7 +5,7 @@ tags: - npm description: Finds and deletes all node_modules in a folder arguments: [] -source_url: "https://stackoverflow.com/questions/22675725/find-unused-npm-packages-in-package-json" +source_url: "https://medium.com/@tomlarge/how-to-delete-all-node-modules-folders-from-your-mac-60b5ce9949cf" author: Tim Smith author_url: "https://timsmith.tech" shells: [] diff --git a/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml index 0046edd..14b0339 100644 --- a/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml +++ b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml @@ -5,7 +5,7 @@ tags: - npm description: Finds and all node_modules in a folder and displays information about them arguments: [] -source_url: "https://stackoverflow.com/questions/22675725/find-unused-npm-packages-in-package-json" +source_url: "https://medium.com/@tomlarge/how-to-delete-all-node-modules-folders-from-your-mac-60b5ce9949cf" author: Tim Smith author_url: "https://timsmith.tech" shells: [] From e8f9e9b9b43ad2b2bd95e8939ce9cf1cb083257a Mon Sep 17 00:00:00 2001 From: Tim Smith <69870077+timscodebase@users.noreply.github.com> Date: Fri, 30 Sep 2022 08:50:59 -0700 Subject: [PATCH 4/6] npm fix --- ...ook_for_all_directories_with_node_modules_and_show_them.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml index 14b0339..7cd438d 100644 --- a/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml +++ b/specs/npm/look_for_all_directories_with_node_modules_and_show_them.yaml @@ -1,5 +1,5 @@ --- -name: Finds and all node_modules in a folder +name: Finds all node_modules in a folder command: find . -name "node_modules" -type d -prune -print | xargs du -chs tags: - npm From 64061385abc5946bdedd7826e4bd19a92ee75241 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 30 Sep 2022 11:11:07 -0700 Subject: [PATCH 5/6] github --- specs/ssh/copy_ssh_key_for_github.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/ssh/copy_ssh_key_for_github.yaml b/specs/ssh/copy_ssh_key_for_github.yaml index 5d30918..f0f94ba 100644 --- a/specs/ssh/copy_ssh_key_for_github.yaml +++ b/specs/ssh/copy_ssh_key_for_github.yaml @@ -2,7 +2,7 @@ name: Copy SSH key for GitHub command: "pbcopy < ~/.ssh/id_ed25519.pub" tags: - - npm + - github description: "Copies the SSH key for GitHub to the clipboard. This is useful for adding the SSH key to GitHub." arguments: - name: email @@ -11,4 +11,4 @@ arguments: source_url: "https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account" author: Tim Smith author_url: "https://timsmith.tech" -shells: [] \ No newline at end of file +shells: [] From baa5c9f67e4170cdd7a6be4e02f76d89579c6a29 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 30 Sep 2022 12:10:31 -0700 Subject: [PATCH 6/6] github --- specs/ssh/generate_new_ssh_key_for_github.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/ssh/generate_new_ssh_key_for_github.yaml b/specs/ssh/generate_new_ssh_key_for_github.yaml index 3c29c19..6e5f0c5 100644 --- a/specs/ssh/generate_new_ssh_key_for_github.yaml +++ b/specs/ssh/generate_new_ssh_key_for_github.yaml @@ -2,7 +2,7 @@ name: Generate new SSH key for GitHub command: "ssh-keygen -t ed25519 -C \"{{email}}\"" tags: - - npm + - github description: "Generates a new SSH key for GitHub. The email address is optional. If you don't specify an email address, you'll be prompted to enter one." arguments: - name: email @@ -11,4 +11,4 @@ arguments: source_url: "https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent" author: Tim Smith author_url: "https://timsmith.tech" -shells: [] \ No newline at end of file +shells: []