This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @see https://github.com/bjyoungblood/es6-error | |
| // @see http://dailyjs.com/2014/01/30/exception-error/ | |
| import {map} from 'lodash'; | |
| const defineProperty = (obj, prop, value) => { | |
| Object.defineProperty(obj, prop, { | |
| configurable: true, | |
| enumerable: false, | |
| value | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function parseDesignators (duration) { | |
| return [ | |
| { | |
| name: 'hours', | |
| designator: 'H' | |
| }, | |
| { | |
| name: 'minutes', | |
| designator: 'M' | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const pattern = | |
| new RegExp( | |
| // starts with PT | |
| '^PT' + | |
| // one or more digits followed by the hours designator H | |
| '((\\d+)H){0,1}' + | |
| // one or more digits followed by the minutes designator M | |
| '((\\d+)M){0,1}' + | |
| // one or more digits with precission followed by the seconds designator S | |
| '((\\d+(\\.\\d+){0,1})S){0,1}' + |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Write NPM_TOKEN registry without BOM @see https://stackoverflow.com/a/32951824 | |
| [IO.File]::WriteAllLines("$(Get-Location)\.npmrc", "//registry.npmjs.org/:_authToken=$env:NPM_TOKEN") | |
| # Set Custom NPM_CONFIG_USERCONFIG Environment variable | |
| $env:NPM_CONFIG_USERCONFIG="$(Get-Location)\.npmrc" | |
| # debug who you are | |
| # npm whoami | |
| # replace * with the npm script you want to run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| prev_cmt="" | |
| for cmt in $(git lg package.json | awk '{print $2}'); | |
| do | |
| git co $cmt >/dev/null 2>&1 | |
| cat package.json | grep 'package-name' >/dev/null 2>&1 | |
| # will fail if does not find the package-name in the current commit | |
| if [ $? -ne 0 ] ; then | |
| echo "cmt: $cmt" | |
| echo "prev_cmt: $prev_cmt" | |
| git co main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| ##### | |
| # Podman System Cleanup | |
| # | |
| # This script performs a comprehensive cleanup of all unused Podman resources | |
| # including networks, volumes, images, containers, pods, and system cache. | |
| # It uses the prune commands to remove dangling and unused resources, then | |
| # displays the final disk usage statistics. | |
| ##### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env sh | |
| # | |
| # podman-manifest-table - List platform digests from a multi-arch container image | |
| # | |
| # Usage: podman-manifest-table <image> | |
| # podman-manifest-table -h|--help | |
| # | |
| # Example: podman-manifest-table node:24.13.1-alpine3.23 | |
| if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # pnpm-audit-table - Display pnpm audit vulnerabilities as a formatted table | |
| # | |
| # Usage: pnpm-audit-table [options] | |
| # pnpm-audit-table -h|--help | |
| # | |
| # Options: | |
| # -D, --dev Only audit devDependencies | |
| # -P, --prod Only audit dependencies |
OlderNewer