Skip to content

Instantly share code, notes, and snippets.

View claudiuconstantin's full-sized avatar
🖥️
Busy building things

Claudiu Constantin claudiuconstantin

🖥️
Busy building things
View GitHub Profile
@claudiuconstantin
claudiuconstantin / script.js
Created August 3, 2018 12:10
Mongo 3.4+ $out collection
db.collection.aggregate(
[
{ "$addFields": {
"name": { "$concat": [ "$firstName", " ", "$lastName" ] }
}},
{ "$out": "collection" }
]
)
@claudiuconstantin
claudiuconstantin / SimpleUtils.ts
Last active April 12, 2018 05:59
Typescript stuff
// range
const range = length => Array.from({ length: length }, (_, key) => key);
Prerequisite:
Install-windowsfeature -name AD-Domain-Services –IncludeManagementTools
Script:
Set-ADAccountPassword -Identity **user-name**
robocopy D:\test F:\test /MIR /FFT /R:3 /W:10 /Z /NP /NDL /XJD /MT[:8]
# https://superuser.com/questions/814102/robocopy-command-to-do-an-incremental-backup
@claudiuconstantin
claudiuconstantin / consoleLog.txt
Created July 20, 2017 07:26
Formatting Chrome console output
console.log(`Here's a green, bold value: %c${value}`, "color: green; font-weight: bold;");