I hereby claim:
- I am reduardo7 on github.
- I am reduardo7 (https://keybase.io/reduardo7) on keybase.
- I have a public key ASBPF9vxn6uoQaQD06IGZB1aCw7qQiLb4_htndVfHfn0mQo
To claim this, I am signing this object:
| #!/usr/bin/env bash | |
| # https://gist.github.com/reduardo7/00928a0a50bf51f7c9ba218e95eb37c3 | |
| ################# Connect to Mongo DB ################# | |
| # Params: | |
| # - Environment: uat/prod | |
| # - POD Name: Optional. Specific POD. | |
| # | |
| # Examples: |
| #!/usr/bin/env bash | |
| # https://gist.github.com/reduardo7/c8ce682f7cb02f90168c5bec23fed53e | |
| ################# Get Master Mongo POD ################# | |
| # Params: | |
| # - Environment: uat/prod | |
| # | |
| # Examples: | |
| # ./get-mongo-master.sh prod |
| function testUser(t) { | |
| console.info(t, | |
| /^[a-z0-9\.\-_]+$/.test(t) && /^[^\.\-_]+/.test(t) && /[^\.\-_]+$/.test(t) && !/[\.\-_]{2,}/.test(t), | |
| /^[a-z0-9\.\-_]+$/.test(t) , /^[^\.\-_]+/.test(t) , /[^\.\-_]+$/.test(t) , !/[\.\-_]{2,}/.test(t)); | |
| } | |
| // Valid | |
| testUser('foo'); | |
| testUser('foo.bar'); | |
| testUser('foo.bar-asd_123'); |
| #!/bin/bash | |
| ############################################### | |
| # To use: | |
| # chmod +x install-redis.sh | |
| # ./install-redis.sh | |
| ############################################### | |
| version=4.0.11 | |
| set -e |
| Get-Item g:\* | Foreach { "Nombre: " + $_.Name + ", Creado: " + $_.CreationTime + "; Modificado: " + $_.LastWriteTime + ", Tamaño: " + $_.Length + " k | |
| b" } |
I hereby claim:
To claim this, I am signing this object:
| (function(){ | |
| $('#files_list > [data-file-id]').each(function(i) { | |
| killIt($(this).attr('data-file-id')); | |
| function killIt(id) { | |
| console.log(id); | |
| $.post('/api/files.delete', { | |
| file: id, | |
| token: boot_data.api_token |
| #!/bin/bash | |
| # Stop all containers | |
| docker stop $(docker ps -a -q) | |
| # Delete all containers | |
| docker rm $(docker ps -a -q) | |
| # Delete all images | |
| docker rmi $(docker images -q) |
| # Run as ROOT: $ sudo su | |
| ( | |
| ########## | |
| # Config # | |
| ########## | |
| # Required | |
| PTECH_SETUP_USER_NAME=username | |
| # Optional |
| # Run as ROOT: $ sudo su | |
| ######### | |
| # Utils # | |
| ######### | |
| @log() { | |
| echo "# $*" | |
| } |