Skip to content

Instantly share code, notes, and snippets.

View fslef's full-sized avatar

fslef fslef

  • Microsoft
  • France
View GitHub Profile
@fslef
fslef / Write-HostPadded.ps1
Last active June 26, 2023 13:15
Write-HostPadded
function Write-HostPadded {
[CmdletBinding()]
param (
[Parameter(Position = 0, Mandatory = $true)]
[string]
$Text,
[Parameter(Position = 1, Mandatory = $false)]
[int]
$IndentLevel = 0,
@fslef
fslef / Connect-ToAzureSubscription.ps1
Last active June 26, 2023 13:14
Connect-ToAzureSubscription
function Connect-ToAzureSubscription {
[CmdletBinding()]
param(
[Parameter(Mandatory = $true, Position = 0)]
[ValidateNotNullOrEmpty()]
[guid]$TenantId,
[Parameter(Mandatory = $true, Position = 1)]
[ValidateNotNullOrEmpty()]
[guid]$SubscriptionId,
# # Import the DotFiles
$helpersPath = Join-Path $PSScriptRoot "helpers"
Get-ChildItem -Path $helpersPath -Filter *.ps1 | ForEach-Object { . $_.FullName }
@fslef
fslef / New-Folder.ps1
Last active June 26, 2023 13:37
New-Folder
function New-Folder {
param (
[Parameter(Position = 0, Mandatory = $true)]
[string]
$Path
)
if (Get-Item $path -ErrorAction Ignore) {
Write-Verbose "Folder $path already exists."
}
@fslef
fslef / New-File.ps1
Created June 26, 2023 13:38
New-File
function New-File {
param (
$Path
)
if (Get-Item $path -ErrorAction Ignore) {
Write-Verbose "File $path already exists."
}
else {
New-Item -Path $path -ItemType File | Out-Null
@fslef
fslef / Contributing.md
Created March 15, 2024 10:07
Contribution Guidelines to projects

Contributing to [ProjectName]

We love your input! We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting a bug
  • Discussing the current state of the code
  • Submitting a fix
  • Proposing new features
  • Becoming a maintainer

We Develop with Github