Skip to content

Instantly share code, notes, and snippets.

View claudioaltamura's full-sized avatar
😀

Claudio Altamura claudioaltamura

😀
View GitHub Profile
@claudioaltamura
claudioaltamura / gist:0cdd433f6edf896fbda8befdfaf77ace
Created November 22, 2023 13:22
Postman: convert response into csv
let response = pm.response.json();
let csv = "";
for (var i = 0; i < response.results.length; i++) {
let line = "";
for(var key in response.results[i]) {
line += response.results[i][key] + ";";
}
csv += line + "\r\n";
}
@claudioaltamura
claudioaltamura / azure-containerapp-deployment.sh
Last active July 10, 2023 12:53
Azure ContainerApp Deployment with Azure Container Registry and external access
# General
az login
echo "logged in \n"
#az extension add --name containerapp --upgrade
#az provider register --namespace Microsoft.App
#az provider register --namespace Microsoft.OperationalInsights
# Azure Resource Group
export AZURE_LOCATION="westeurope"
export AZURE_RESOURCE_GROUP="example-group"
@claudioaltamura
claudioaltamura / azure-fundamentals-topic.md
Last active May 25, 2022 09:34
My curated list of links to important topics from the Azure Fundamentals Exam

AZ-900 Azure Fundamentals

My curated list

There are plenty of resources out there to help you study for the AZ-900 exam. The exam is for candidates who are just beginning to work with cloud-based solutions and services.

It's an opportunity to gather knowledge of cloud concepts, services, workloads, security, privacy, pricing and support. Here comes my list:

Cloud Concepts

Benefits

@claudioaltamura
claudioaltamura / gist:64974843a2aca6b18a8824ee5346d5fc
Created August 10, 2021 16:32
Maven switch profile with git repo
git init
touch .gitignore
echo 'repository' >> .gitignore
echo 'wrapper' >> .gitignore
git add .
git commit -m "initial commit"
git checkout -b other_config
change settings.xml
@claudioaltamura
claudioaltamura / config.properties
Created December 31, 2020 09:15
SchemaSpy MySQL config
# type of database. Run with -dbhelp for details
schemaspy.t=mysql
# optional path to alternative jdbc drivers.
schemaspy.dp=mysql-connector-java-8.0.22
# database properties: host, port number, name user, password
schemaspy.host=localhost
schemaspy.port=3306
schemaspy.db=db
schemaspy.u=root
schemaspy.p=password
@claudioaltamura
claudioaltamura / build.gradle.kts
Last active May 3, 2020 06:20
build.gradle.kts example with additional JavadocDocletOptions for apiNote, implSpec and implNote
import org.gradle.api.tasks.testing.logging.TestLogEvent
plugins {
java
application
}
repositories {
jcenter()
}
@claudioaltamura
claudioaltamura / GenericArray.java
Created November 23, 2018 05:15
Create a generic array with toArray() and Array.newInstance
Map<String, CompletableFuture<JsonNode>> completableFutures =
this.createCompletableFutures(myRequest);
Collection<CompletableFuture<JsonNode>> values = completableFutures.values();
CompletableFuture<JsonNode>[] completableFuturesArray =
values.toArray((CompletableFuture<JsonNode>[])Array.newInstance(CompletableFuture.class,completableFutures.size()));
CompletableFuture<Void> combinedFutures = CompletableFuture.allOf(completableFuturesArray);
combinedFutures.get(100, TimeUnit.MILLISECONDS);
@claudioaltamura
claudioaltamura / StringToMap.java
Last active October 24, 2018 12:58
Map string with key values to Map in Java
public class StringToMap {
public static Map<String, String> map(String str) {
return (HashMap<String, String>) Arrays
.asList(str.split(","))
.stream().map(s -> s.split("="))
.collect(Collectors.toMap(e -> e[0], e -> e[1]));
}
}
@claudioaltamura
claudioaltamura / java
Created August 24, 2018 14:15
Stringify a map example
String stringifiedMap =
map
.entrySet()
.stream()
.map(i -> i.getKey() + "=" + i.getValue())
.collect(Collectors.joining("&"));