Skip to content

Instantly share code, notes, and snippets.

View sballarati's full-sized avatar

Sebastian Ballarati sballarati

View GitHub Profile
@sballarati
sballarati / GetPingFederateFederationMetadata.md
Last active April 20, 2017 19:14
Get Ping Federate FederationMetadata file
@sballarati
sballarati / edit-mac-host-file.md
Last active February 24, 2017 19:21
Edit Mac OSX host file
  1. Open a Terminal, type: sudo nano /etc/hosts and hit Return
  2. Enter your admin password and hit Return
  3. In the Nano text editor add or edit the file
  4. Once done, hold Ctrl + O and hit Return to save
  5. Finally, hold Ctrl + X to exit
@sballarati
sballarati / copyAzureBlobToNewAccount.ps1
Last active September 20, 2016 15:56
Copies an Azure blob to another account
#change the current storage account
Set-AzureSubscription -SubscriptionName "{source subscription}" -CurrentStorageAccount "{storage account name}"
Select-AzureSubscription "{source subscription}"
$destContext = New-AzureStorageContext –StorageAccountName "{destination storage account}" -StorageAccountKey ""
$sourceContext = New-AzureStorageContext –StorageAccountName "{source account}" -StorageAccountKey ""
#New-AzureStorageContainer -Name "{container name}"
### Asynchronous Copy From Blob Context to Blob Context ###
@sballarati
sballarati / newAADServicePrincipal.ps1
Created February 3, 2016 20:48
Creates an Azure Active Directory Service Principal
#connect using a global admin account of the AD where you want the Service Principal to be created
$msolcred = get-credential
connect-msolservice -credential $msolcred
#symmetric key used for some auth scenarios (keep the object id, app principal id and symm key for the future)
New-MsolServicePrincipal -DisplayName {yourspname} -Type symmetric
#assigns a Company Admin role
Add-MsolRoleMember -RoleName "Company Administrator" -RoleMemberType ServicePrincipal -RoleMemberObjectId {principal objectId}
@sballarati
sballarati / jsonStringToFile.ps1
Last active January 19, 2016 13:29
Create a JSON file from a string
$json = @'
some json multi-line string goes here
'@;
$json | Out-File settings.json