With azure cli 2.0:
How to get all private IPs of an azure virtual machine scale set (vmss)
# Date: Feb-03-2017
SCALE_SET=""
RG=""
az vmss nic list --resource-group $RG --vmss-name $SCALE_SET | jq -r '.[] | .ipConfigurations[] | .privateIpAddress'
# this script will loop through every day between the two dates and download the amplitude data to a zip file named after the day | |
# the script will actually duplicate the 00 data, but running unzip -o will take care of it by overwriting | |
d=2018-01-01 | |
while [ "$d" != 2020-09-02 ]; do | |
formatted=$(date -d $d "+%Y%m%d") | |
echo "getting ${formatted}" | |
d=$(date -I -d "$d + 1 day") | |
formatted_new=$(date -d $d "+%Y%m%d") | |
curl -u API_Key:Secret_Key "https://amplitude.com/api/2/export?start=${formatted}T00&end=${formatted_new}T00" >> ${formatted}.zip | |
done |
# Date: Feb-03-2017
SCALE_SET=""
RG=""
az vmss nic list --resource-group $RG --vmss-name $SCALE_SET | jq -r '.[] | .ipConfigurations[] | .privateIpAddress'
package utils | |
import scala.collection.mutable | |
import scala.language.implicitConversions | |
object IteratorUtils { | |
/** | |
* Implicit class that adds "groupBy" functionality to an iterator. The result is a mutable.HashMap and will be | |
* stored in memory in its entirety |
export DEBIAN_FRONTEND=noninteractive | |
exec > >(tee -i /var/log/javanode.log) | |
exec 2>&1 | |
echo "starting mount installation" | |
chmod -R og+r /var/log/ | |
curl -sL https://pubtrip.blob.core.windows.net/trippublic/afs-utils-0.1.sh -o afs-utils-0.1.sh | |
bash afs-utils-0.1.sh $@ | |
echo "mounted /mnt/storage" | |
bash /mnt/storage/install/agent.sh |
I recently needed to apply CORS (Cross Origin Request Scripting) to a project that I'm working on. If found 2 posts that helped to achieve it:
I combined both to solve my problem: I have a User CRUD (Play!) webservice and a (Play!) web app that services a SPA (Single Page Application). The SPA needs to access the CRUD webservice, but to acheive this, I would need to apply some CORS rules on both applications.