This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async System.Threading.Tasks.Task authenticateAsync() | |
{ | |
string[] scopes = new string[] { "user.read" }; | |
var app = PublicClientApplicationBuilder.Create("ClientID") | |
.WithRedirectUri("redirect url") | |
.WithAuthority(AzureCloudInstance.AzurePublic, "tenant id") | |
.Build(); | |
var accounts = await app.GetAccountsAsync(); | |
AuthenticationResult result; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Command to tag the docker image. This is required before pushing the image into the ACS | |
docker tag mongodbcore:latest acskubesg.azurecr.io/mongodbcore:v1.2 | |
#This is for loging into the ACS. This is required before pushing the images into the ACR | |
az acr login --name "ACSKUBESG" | |
#This is for getting the service principle set up for the AKS | |
az aks get-crediantials --resource-group RG_KUBE_SG --name AKSKUBESG | |
#Command to push an image into acs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
url = "http://xx.xx.xx.xx/occm/api" | |
email=raw_input("email: ") | |
password=raw_input("password: ") | |
headers = { | |
'content-type': "application/json", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set ORACLE_SIT=XE | |
sqlplus / as sysdba | |
alter user <username> identified by <password>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command to add GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Command to add docker repository to APT source | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# Update package database | |
sudo apt-get update | |
# Command to install from Docker repo instead of Ubuntu repo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Command to pull elastic search docker container. | |
docker pull elastic search | |
# Create a directory esdata | |
docker run -d --name elasticsearch -p 9200:9200 -p 9300:9300 -v /esdata:/usr/share/elasticsearch/data elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo docker ps | |
sudo docker ps -a | |
sudo docker pull <<image name>>:<<versionname>> | |
sudo docker commit <<oldcontainername>> <<newcontainername>> |