Last update: 30-01-2024
Last view: 30-01-2024
Go to your work folder, mine is located at:
F:/Work/EnterpriseName/
And then create a .gitconfig-work
with the following data:
$Interval = Read-Host -Prompt 'Write time interval in seconds. Default is 1 second' | |
if ($Interval -le 0) { | |
$Interval = 1 | |
} | |
if ($Interval -lt 0.25) { | |
$Interval = 0.25 | |
} |
// dump | |
mongodump --uri="mongodb://localhost:27017/dbName" --gzip --excludeCollection="collName" --archive="./dump" | |
// restore | |
mongorestore --uri="mongodb://localhost:27017/dbName" --gzip --drop --archive="./dump" |
Write-Host "Shutdown timer..." | |
$Horas = Read-Host -Prompt 'Hours (can be 0)' | |
$Minutos = Read-Host -Prompt 'Minutes' | |
$Segundos = 0 | |
if ($Horas -eq 0) { | |
$Horas = 0 |
{ | |
"LOG": { | |
"prefix": ["cl", "clog", "log"], | |
"body": ["console.log( ${1:string} );"] | |
}, | |
"LOG $": { | |
"prefix": ["clf", "logf"], | |
"body": ["console.log ( `${1:Texto} \\${${2:123}\\}` );"] | |
}, | |
"LOG DEBUG": { |
const readline = require("readline"); | |
const rl = readline.createInterface({ | |
input: process.stdin, | |
output: process.stdout | |
}); | |
async function doQuestion(question) { | |
const response = await new Promise( resolve => { | |
rl.question(question, (data) => { |
import { makeAutoObservable } from "mobx"; | |
import persist from "./persist"; | |
export default class UserStore { | |
constructor() { | |
makeAutoObservable(this); |
const networkInterfaces = require("os").networkInterfaces(); | |
let IPv4; | |
Object.keys(networkInterfaces).forEach( device => { | |
networkInterfaces[device].forEach((details) => { | |
if (details.family === "IPv4" && details.internal === false) { | |
IPv4 = details.address; | |
}; | |
}); |
// package.json | |
{ | |
"scripts": { | |
"devToMaster": "git checkout dev && git pull && git checkout master && git pull && git merge dev && git push && git checkout dev", | |
"mergeTo": "git checkout %npm_config_from% && git pull && git checkout %npm_config_to% && git pull && git merge %npm_config_from% && git push && git checkout %npm_config_from%" | |
} | |
} | |
// ----------------- | |
// router.js | |
// ----------------- | |
// URL: backend.com/uno?id=111 | |
app.get("/uno", controllerUno); | |
// URL: backend.com/dos | |
// BODY: {id: 222} |