Created
July 9, 2022 19:13
-
-
Save leandromoh/5d4d24e63421fc94e5399d14d631085e to your computer and use it in GitHub Desktop.
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
=========================================================== | |
<# Start minikube #> | |
minikube stop; minikube start; minikube docker-env; | |
<# Point shell to minikube #> | |
& minikube -p minikube docker-env | Invoke-Expression; | |
<# Start docker #> | |
docker start mongo1 mongo2; | |
============================================================ | |
BASH ONLY | |
rm -rf **/*/bin **/*/obj | |
============================================================ | |
(function copyStringToClipboard (str) { | |
var el = document.createElement('textarea'); | |
el.value = str; | |
el.setAttribute('readonly', ''); | |
el.style = {position: 'absolute', left: '-9999px'}; | |
document.body.appendChild(el); | |
el.select(); | |
document.execCommand('copy'); | |
document.body.removeChild(el); | |
})(JSON.parse(localStorage["userTokens"]).id_token) | |
============================================================ | |
atenção pra gente não estender no começo e os coleguinhas do final ter que falar correndo | |
============================================================ | |
db.getCollectionNames().map(x => { var resp = eval(`db.${x}.count()`); return { x, resp }; } ) | |
db.getCollectionNames().map(x => { var resp = eval(`db.${x}.getIndexes().length`); return { x, resp }; } ) | |
db.getCollectionNames().map(x => { var resp = eval(`db.${x}.deleteMany({})`); return { x, resp }; } ) | |
============================================================ | |
C:\Windows\System32\WindowsPowerShell\v1.0 | |
============================================================ | |
https://www.sohamkamani.com/blog/2016/06/30/docker-mongo-replica-set/ | |
cfg = rs.conf() | |
cfg.members[0].priority = 9 | |
cfg.members[1].priority = 0.5 | |
rs.reconfig(cfg) | |
============================================================ | |
Cron tutorial | |
https://medium.com/@ajanthy/cron-expression-5a68526ffb23 | |
Cron expressions validators/explainers | |
https://crontab.cronhub.io/ | |
http://www.cronmaker.com/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment