git config --global user.name "Amit G"
git config --global user.email "amit-g@users.noreply.github.com"
git config --global init.defaultBranch main
function enumerateFolders(folders) { | |
while (folders.hasNext()) { | |
let folder = folders.next(); | |
console.log(folder.getName()); | |
} | |
} | |
function enumerateFoldersInRootFolder() { | |
let folders = DriveApp.getRootFolder().getFolders(); | |
console.log("Folders in root folder"); |
& 'C:\Program Files\OpenSSL\bin\openssl.exe' req -x509 -nodes -keyout C:\Certs\self-signed-key.pem -out C:\Certs\self-signed-cert.pem -subj '/CN=localhost' | |
# New-Item -ItemType SymbolicLink -Path "key.pem" -Target "C:\Certs\self-signed-key.pem" | |
# New-Item -ItemType SymbolicLink -Path "cert.pem" -Target "C:\Certs\self-signed-cert.pem" | |
npx http-server --ssl --cert C:\Certs\self-signed-cert.pem --key C:\Certs\self-signed-key.pem |
Import-Module -Name Terminal-Icons | |
oh-my-posh --init --shell pwsh --config https://gist.githubusercontent.com/amit-g/898df4ae41af11b58b00d00978769e26/raw/be8e68a58df2c80cfd396587fe42d9f6abace297/omp.json | Invoke-Expression | |
Function Set-LocationDocuments { Set-Location "${env:USERPROFILE}/Documents" } | |
Function Set-LocationDownloads { Set-Location "${env:USERPROFILE}/Downloads" } | |
Function Get-GitConfigNames { git config --global user.name; git config --global user.email; git config user.name; git config user.email; } | |
Set-Alias cddoc Set-LocationDocuments |
Run uninstall twice (it might fail first time)
Further cleanup
$KeyValultName = "YourKeyVaultName" | |
function Set-MyAzKeyVaultSecret($SecretName) | |
{ | |
$SecretValue = Read-Host -Prompt "Please enter the secret value for $SecretName" -AsSecureString | |
Set-AzKeyVaultSecret -VaultName $KeyValultName -Name $SecretName -SecretValue $SecretValue | |
} |
Connect-MgGraph -UseDeviceAuthentication -ContextScope Process -Scopes "Mail.Read", "Mail.ReadWrite", "Mail.ReadBasic" | |
Get-MgUser | |
$UserId = (Get-MgUser).Id | |
Get-MgUserMailFolder -UserId $userId -Filter "startswith(displayName, 'Junk')" | Format-List | |
$MailFolderId = (Get-MgUserMailFolder -UserId $userId -Filter "startswith(displayName, 'Junk')" | Select-Object -First 1).Id | |
Get-MgUserMailFolderMessage -UserId $userId -MailFolderId $MailFolderId -Property "sender, subject" -Top 1000 | Select-Object @{ n='EmailDomain'; e={$_.Sender.EmailAddress.Address -Replace '[^@]+@', ''} }, @{ n='EmailAddress'; e={$_.Sender.EmailAddress.Address;} }, @{ n='Name'; e={$_.Sender.EmailAddress.Name} }, @{ n='Subject'; e={$_.Subject;} } | ConvertTo-Csv -NoTypeInformation > OutlookJunk-$(Get-Date -Format 'yyyyMMdd').csv |
Using Delve: https://delve.office.com/mt/v3/people/profileimage?userId=email@address.com
All pictures (could be too many): https://sharepointdomain-my.sharepoint.com/User%20Photos/Profile%20Pictures
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "left", | |
"segments": [ | |
{ | |
"background": "#c386f1", | |
"foreground": "#ffffff", | |
"leading_diamond": "\ue0b6", |