# Set User details
$UserCredential = Get-Credential
# Create session
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
# Import PS Sesion
Import-PSSession $session
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
if (input.value) { | |
realmName = customConnection; //'Custom-DB' | |
} if else { | |
realmName = ADConnection; | |
} else { | |
realmName = databaseConnection; | |
} | |
webAuth.login( | |
{ |
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
<script> | |
// Overview. | |
// | |
// This script is used to listen for clicks on table rows with a data-uid attribute. | |
// It also listens for new rows being added to the table and attaches the event listener to the new rows. | |
// Then it redirects the user to the form page with the correct ID to prefill the form | |
// | |
// But first we need to poll the DOM for the table container because the table is loaded asynchronously. | |
// | |
// The script is added to the page via a script editor web part. |
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
const headers = { | |
"Access-Control-Allow-Origin": "<URL>", | |
"Content-Type": "application/json", | |
"Strict-Transport-Security": "max-age=31536000", | |
"Access-Control-Allow-Origin": "<URL>", | |
"x-frame-options": "DENY" | |
} | |
return { | |
statusCode: 200, |
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
static getDerivedStateFromProps(props, current_state) { | |
console.log(props) | |
if (current_state.data !== props.data) { | |
return [{ | |
id: props.id, | |
data: props.data | |
}] | |
} | |
return null | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Blank Template</title> | |
</head> | |
<body> | |
<div class="container"> | |
<canvas id="chart1" width="800" height="450"></canvas> | |
</div> |
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
{ | |
"delta": {"ops":[{"insert":"sdf\"But I must explain to you how all this mistaken idea of denouncing pleasure and praisinasdfg pain dsfwas born and I will give you a complete account of the system, and expound the actual teachings of the great explorer of the truth, the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain some advantage from it? But who has any right to find fault with a man who chooses to enjoy a pleasure that has no annoying consequences, or one who avoids a pain that profdsaduces no resultant pleasure?\"zx bx |
# New user script
#write title
Write-Host "New User Creator 1.0"
#import the active directory module
Import-Module ActiveDirectory
Nginx is a fast web server compared to Apache and becomes more popular these days. In order to install Nginx on CentOS 7, we need to add the EPEL repository using the following command. EPEL stands for Extra Packages for Enterprise Linux.
sudo yum install epel-release -y
NewerOlder