{"id":18400916,"url":"https://github.com/magicmark/fullstack-dev-scripts","last_synced_at":"2026-01-28T01:35:08.447Z","repository":{"id":69481713,"uuid":"239924843","full_name":"magicmark/fullstack-dev-scripts","owner":"magicmark","description":"A collection of scripts/snippets/cheat sheets I use during full stack development.","archived":false,"fork":false,"pushed_at":"2023-03-24T17:36:51.000Z","size":54,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-15T04:28:59.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/magicmark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-12T04:13:38.000Z","updated_at":"2023-03-24T17:33:21.000Z","dependencies_parsed_at":"2024-11-06T03:04:56.394Z","dependency_job_id":"bc46e991-d012-47d9-9ba9-087d201e1cac","html_url":"https://github.com/magicmark/fullstack-dev-scripts","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/magicmark/fullstack-dev-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ffullstack-dev-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ffullstack-dev-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ffullstack-dev-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ffullstack-dev-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/magicmark","download_url":"https://codeload.github.com/magicmark/fullstack-dev-scripts/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/magicmark%2Ffullstack-dev-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28831760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T23:29:49.665Z","status":"ssl_error","status_checked_at":"2026-01-27T23:25:58.379Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:37:15.434Z","updated_at":"2026-01-28T01:35:08.433Z","avatar_url":"https://github.com/magicmark.png","language":null,"readme":"# ![Fullstack Dev Scripts](logo.gif)\n\nA collection of scripts/snippets/etc I use during full stack development.\n\n_(I still use [tldr pages](https://tldr.sh/) as a cheat sheet for specific tooling examples. This repo is intended to contain scripts to achieve certain goals, and not as a generic reference for any particular toolset.)_\n\n## Table of contents\n\n\u003c!--ts--\u003e\n   * [npm/yarn package managment](#npmyarn-package-managment)\n   * [JavaScript](#javascript)\n      * [Debugging](#debugging)\n   * [Bash](#bash)\n   * [Docker](#docker)\n\u003c!--te--\u003e\n\n## npm/yarn package managment\n\n### list all top level JS dependencies\n\n```sh\njq -r '.dependencies , .devDependencies | to_entries | .[] | .key' package.json | tr '\\n' ' '\n```\n\n#### With versions:\n\n```sh\njq -r '.dependencies | to_entries[] | .key as $k | .value as $v | \"\\($k)@\\($v)\"' package.json | tr '\\n' ' '\n```\n\n## find all linked packages\n\n```sh\nfind node_modules -maxdepth 1 -type l -ls\n```\n\n## JavaScript \n\n### Debugging\n\nSee: https://nodejs.org/api/debugger.html#debugger\n\n`breakOnException` in particular is useful for debugging programs that gobble up stack traces\n\n```\nnode inspect foo.js\n```\n\n#### Jest Tests\n\n```\nNODE_INSPECT_RESUME_ON_START=1 node inspect node_modules/.bin/jest --runInBand --coverage false /path/to/test.js\n```\n\n### CLI Script\n\n```js\n#!/usr/bin/env node\n\n/**\n * @file Tool to do stuff\n *\n * Usage:\n *\n *   $ ./path/to/script \u003cfoo\u003e \u003cbar\u003e\n */\n\nasync function main({ foo, bar }) {\n    // do stuff\n}\n\nif (!process.env.NODE_ENV \u0026\u0026 require.main === module) {\n    const [ , , foo, bar] = process.argv;\n    \n    main({ foo, bar }).catch(e =\u003e {\n        console.error('\\n======= Error caught in ./path/to/my/script =======');\n        console.error(e);\n        process.exit(1);\n    });\n}\n```\n\n## Bash\n\n### killing all processes related to X\n\nThis is usually a super bad idea. Probably don't run this, unless you're feeling super lazy.\n\n```sh\nps fux | grep my_service_here | tr -s ' ' | cut -d' ' -f2 | xargs kill\n```\n\n### change the value of a constant in a directory\n\n```sh\nfind /path/to/directory -type f -name \"*.yaml\" | xargs -I{} sed -i -e 's/mem: 2800/mem: 4096/g' {}\n```\n\n### `tree` (with ignored directories)\n\n```bash\ntree -a -I 'node_modules|\\.git'\n```\n\n### bash script\n\n```bash\n#!/bin/bash\nset -euo pipefail\n\n# https://stackoverflow.com/a/246128/4396258\nDIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" \u003e/dev/null 2\u003e\u00261 \u0026\u0026 pwd )\"\nROOT=\"${DIR}/..\"\n\nif [ \"$#\" -ne 1 ]\nthen\n    echo '/path/to/script \u003cfoo\u003e'\n    exit 1;\nfi\n\nFOO=\"$1\"\necho $FOO\n```\n## Docker\n\n### run a hello world docker container (with cleanup)\n\n```sh\ndocker run -it --rm ubuntu bash\n```\n\n### build \u0026 run a container\n\n```sh\ndocker build -t myapp1 .\ndocker run -it --rm --name app-instance myapp1\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ffullstack-dev-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmagicmark%2Ffullstack-dev-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmagicmark%2Ffullstack-dev-scripts/lists"}