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
| var collections = db.getCollectionNames(); | |
| collections.forEach(function (item) { | |
| print(item + ": " + db[item].stats().count); | |
| }); |
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
| #!/bin/bash | |
| podId=$(kubectl get pod -o name | \ | |
| grep --color=never -o -E \ | |
| "\/.*$(echo $@ | tr '_ ' '.').*" \ | |
| ) | |
| podId=$(echo $podId | sed 's/ .*//g' | tr -d '/') | |
| echo Showing logs from $podId | |
| kubectl logs $podId --tail=20 -f |
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
| #!/usr/bin/env python2 | |
| from os import environ | |
| import datetime | |
| import socket | |
| import ssl | |
| import logging | |
| from urllib2 import Request, urlopen, URLError, HTTPError | |
| import json |
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
| #!/bin/bash | |
| COMPOSER_MEMORY_LIMIT=-1 composer require --dev barryvdh/laravel-ide-helper | |
| php artisan ide-helper:generate | |
| php artisan ide-helper:meta | |
| COMPOSER_MEMORY_LIMIT=-1 composer remove barryvdh/laravel-ide-helper |
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
| #!/bin/bash | |
| # @source: https://medium.com/@Drew_Stokes/bash-argument-parsing-54f3b81a6a8f | |
| PARAMS="" | |
| while (( "$#" )); do | |
| case "$1" in | |
| -a|--my-boolean-flag) | |
| MY_FLAG=0 | |
| shift |
OlderNewer