How to bump version number on Git push for projects using npm

Note: This works only from command line as user feedback is needed from keyboard to know which part of the version number to bump. It should not break pushing from a GUI tool (e.g. TortoiseGit), but you will not be prompted to update the version number. The positive thing is that the version change is done neatly as a separate commit. Install husky as dev-dependency See instructions. Add the following script into new file .husky/pre-push ...

How to collect all npm licenses from multiple subdirectories with Powershell

Install license-report (https://www.npmjs.com/package/license-report) npm install -g license-report run the script Get-ChildItem -Directory | foreach { $_ >> ./licenses.csv ; license-report --output=csv --only=prod --package=./$_/package.json >> ./licenses.csv } You can use the same idea to run other stuff in subdirectories. Just replace the command. Here is an example of git pull. Get-ChildItem -Directory -Force -Recurse *.git | ForEach-Object { cd $_.Parent.FullName; Write-Host $_.Parent.FullName; git pull }

How to update a specified item in a nested array with Mongoose

In this blog post, we’ll go over how to update a specified item in a nested array inside a Mongoose document. ##Setting up the environment First, let’s set up the environment by creating a Mongoose schema and model. Here’s an example schema that has a nested array of items: const mongoose = require('mongoose'); const schema = new mongoose.Schema({ items: [{ name: String, quantity: Number }] }); const Model = mongoose.model('Model', schema); ##Updating a specified item in a nested array ...

How to access your Synology NAS services over public Web

To access the Syonology NAS ports outside of your local network, you need to set up DDNS, a wildcard certificate, and a reverse proxy to support HTTPS access. DDNS Go to Control Panel / External Access / DDNS. Click Add. Make the following selections: Service Provider: Synology Hostname: yourname.synology.me Username/Email: <your email> Password: <make it up> Exteral address: no need to change Wildcard certificate Go to Control Panel / Security / Certificate. Click Add. ...

How to find out your UID and GID on Synology NAS

The UID and GID values for default user on Synlogy NAS are usually 1026 and 100. There is a very simple way to check the values as follows: Create a new Scheduled task asn User-defined script Name the script whatever you see fit Set it to be not repeating Set it to send run details to your email Write the script: id Not too complex, huh? Run it and soon enough, you will receive the email containing the UID and GID values. These values will be needed to install some Docker containers, for instance the Codeserver. ...