npm start
- Package:NodeMon
- sudo npm install nodemon -g
| # call this from ~/.bashrc | |
| # like source ~/projects/Dockcommander/docker-bash-aliases.sh | |
| alias d=docker | |
| alias dcl='docker container ps -a' | |
| alias dps=dcl | |
| alias dcstats='docker stats' | |
| alias dcs='docker stats' | |
| alias dr='docker run' | |
| alias drm='docker rm ' |
| { | |
| "editor.trimAutoWhitespace": false | |
| } |
| foreach ($chatDatas as $chat) | |
| { | |
| //Expression capturing URL string | |
| $urlXpression = '~(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i'; | |
| //replacing in text URL with formatted HTML Linked Tag | |
| $chatHTML = preg_replace($urlXpression, '<a href="$0" target="_blank" title="$0">$0</a>', $chat); | |
| //display each chat element | |
| echo "<tr><td>" | |
| . $chatHTML["ChatLine"] |
npm start
| //@a Watch a folder and do something with the changes | |
| var watchPath = "/www/x/fs_watch_folder_1811051535/tests"; | |
| console.log("Watching test path: " + watchPath); | |
| var fs = require("fs"); | |
| var sleep = require("sleep"); | |
| fs.watch(watchPath, (eventType, filename) => { | |
| console.log(eventType); | |
| // could be either 'rename' or 'change'. new file event and delete |
| /*@@@@ | |
| @a Fetch a uniform resource locator title using NodeJS | |
| @d Nov 6, 2018 at 10:10 AM | |
| @tlid 181106091002 | |
| @kw | |
| @metatxt Automatic formatting of uniform of the service location when it is posted | |
| @s Working | |
| @CR | |
| @ECR |
| // cliapp.js | |
| "use strict"; | |
| const args = require("minimist")(process.argv.slice(2)); | |
| //console.log(args); | |
| console.log(args.i); |
| --Fix inserting Script into code being executed | |
| select `af_chat`.`tbl_chat`.`Id` AS `Id`,`af_chat`.`tbl_chat`.`Tlid` AS `Tlid`, | |
| replace(replace(replace( | |
| `af_chat`.`tbl_chat`.`ChatLine`,'&','&'),'<','<'),'>','>') | |
| AS `ChatLine`, |
| //@stcgoal Getting clipboard in NodeJS, thanks to : https://github.com/sindresorhus/clipboardy | |
| const clipboardy = require('clipboardy'); | |
| //clipboardy.writeSync('🦄'); | |
| var r = clipboardy.readSync(); | |
| // |
| var p = require('path'); | |
| var tpath = 'tmp'; | |
| tpath = p.join(tpath, 'mysubdir'); |