Skip to content

Instantly share code, notes, and snippets.

@speaud
speaud / gist:e91cfffa72cb4dd72a2c4a89a9590aba
Created February 1, 2024 18:38
NPM scripts to help with version tagging
"tag:create": "echo \"enter version to create: \" && read x && git tag $x $(git log -n 1 --pretty=format:\"%h\") && git push origin $x && sed -i -e \"s/\\\"version\\\": \\\"[0-9]*.[0-9]*.[0-9]*\\\"/\\\"version\\\": \\\"$x\\\"/g\" package.json && git add . && git commit -m \"Bump version\" && git push",
"tag:delete": "echo \"enter version to delete: \" && read y && git tag -d $y && git push --delete origin $y"
@speaud
speaud / set version tag sript
Last active October 22, 2023 03:14
Simple bump version script for python projects which use setup.py and git
#!/bin/bash
: '
This script should be configured to run during the pre-commit process of release branches however it could be manually executed before a release
This script will
1) Validate the version argument passed
2) Update the version value in setup.py
3) Commit and push the file change
4) Update and push the new git tag
@speaud
speaud / README.md
Last active May 13, 2020 01:14
A node process to watch file/directory for changes. Native implementation of the "live reload" experience web developers praise.

This is a native implementation of the web developers beloved "live reload," experience for a Node.js program.

This Node process will watch a file or directory (i.e., the program source).

When a change occurs then program will reload without manual intervention.

node watch --runtime index.js

node watch --runtime build/

@speaud
speaud / parse_dotenv.bash
Created November 24, 2019 22:51 — forked from judy2k/parse_dotenv.bash
Parse a .env (dotenv) file directly using BASH
# Pass the env-vars to MYCOMMAND
eval $(egrep -v '^#' .env | xargs) MYCOMMAND
# … or ...
# Export the vars in .env into your shell:
export $(egrep -v '^#' .env | xargs)