Skip to content

Instantly share code, notes, and snippets.

View sathishjayapal's full-sized avatar
🎯
Focusing

dotsky sathishjayapal

🎯
Focusing
View GitHub Profile
import Song.Song;
import java.util.Arrays;
import java.util.List;
public class MainJava9 {
public static List<Song> createSong() {
return Arrays
.asList(new Song("Venilave", 2000, "Rehman"), new Song("Va Va Vasanthame", 2002, "Raja"),
new Song("Vanjokotiya", 2010, "Raja"), new Song("semmaFigure", 2008, "Rehman"),
@sathishjayapal
sathishjayapal / template.json
Last active December 11, 2018 13:21
JSON for the Azure Deploy Testing
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.1",
"parameters": {
"rgName": {
"type": "string"
},
"rgLocation": {
"type": "string"
},
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"storageAccountType": {
"value": "Standard_LRS"
}
}
}
@sathishjayapal
sathishjayapal / LoggingSample.java
Created August 28, 2021 04:52
Java16 Logging Gist
package me.sathish;
import java.io.IOException;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
public class LoggingSample {
private static Logger logger = Logger.getLogger("me.sathish.package");
private static FileHandler fh;
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2021-08-28T04:37:27.363135Z</date>
<millis>1630125447363</millis>
<nanos>135000</nanos>
<sequence>0</sequence>
<logger>me.sathish.package</logger>
<level>SEVERE</level>
@sathishjayapal
sathishjayapal / Secondfile.txt
Created August 28, 2021 04:57
Secondfile.txt
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
<date>2021-08-28T04:37:53.555130Z</date>
<millis>1630125473555</millis>
<nanos>130000</nanos>
<sequence>3</sequence>
<logger>me.sathish.package</logger>
<level>SEVERE</level>
package me.sathish.aws.common;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awscdk.core.Tags;
import software.amazon.awscdk.services.s3.Bucket;
import java.io.IOException;
import java.io.InputStream;
import java.time.LocalDateTime;
@sathishjayapal
sathishjayapal / Main.java
Created March 24, 2022 04:11
Java 18 JSON String
package me.sathish;
public class Main {
public static void main(String[] args) {
String simpleJSONData = """
{
"fullName": "%s",
"aadress": "%s",
"title": "%s"

AZ- Service principal commands

Loging with service principal credentials. Remember the tenant parameter

az login --service-principal -u -p --tenant

List the role definitions - List all the role definitions

az role definition list --all

List the role assignments - Lists all the role assignments

az role assignment list --all

You can find the same information by running the following command in the Cloud Shell. They are listed in the Additional Outbound IP Addresses field.

az webapp show \

azure
account
list [options] #List the imported subscriptions
show [options] [subscriptionNameOrId] #Show details about a subscription
set [options] <subscriptionNameOrId> #Set the current subscription
clear [options] #Remove a subscription or environment, or clear all of the stored account and environment info
import [options] <file> #Import a publishsettings file or certificate for your account
download [options] #Launch a browser to download your publishsettings file
env... #Commands to manage your account environment