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/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 "# $*" | |
} |
Working on Grails 3 I realized that I no longer can specify external configuration using the standard grails.config.locations
property in Config.groovy
file.
Reason is obvious! There is no Config.groovy
now in Grails 3. Instead we now use application.yml
to configure the properties. However, you can't specify the external configuration using this file too!
What the hack?
Now Grails 3 uses Spring's property source concept. To enable external config file to work we need to do something extra now.