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
// This is a solution for the **Daily Challenge #4 - Checkbook Balancing** challenge | |
// The link to reach this is https://dev.to/thepracticaldev/daily-challenge-4-checkbook-balancing-hei | |
const input = `1233.00 | |
125 Hardware;! 24.8?; | |
123 Flowers 93.5 | |
127 Meat 120.90 | |
120 Picture 34.00 | |
124 Gasoline 11.00 | |
123 Photos;! 71.4?; |
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
// This is a solution for the **Daily Challenge #5 - Ten Minute Walk** challenge | |
// The link to reach this is https://dev.to/thepracticaldev/daily-challenge-5-ten-minute-walk-1188 | |
function getWalkSteps(walkTime) { | |
if(walkTime % 2 > 0) { | |
throw new Error('You cannot come back'); | |
} | |
const distance = walkTime/2; | |
const x = Math.floor(Math.random(distance) * distance); |
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 CELSIUS_SCALE = 'Celsius'; | |
const FAHRENHEIT_SCALE = 'Fahrenheit'; | |
const KELVIN_SCALE = 'Kelvin'; | |
const TransformationMethodsHandler = function() { | |
let collection = {}; | |
return { | |
// Returns the transformation method by getting the source and target types |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string] $Path, | |
[Parameter(Mandatory=$true)] | |
[string] $Name, | |
[Parameter(Mandatory=$true)] | |
[string] $OutFile | |
) | |
# Set the paths for the certificate, private key, and PEM files |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string]$ModuleName | |
) | |
Write-Host "Checking if module '$ModuleName' is installed..." | |
$moduleInstalled = Get-Module -Name $ModuleName -ListAvailable | |
if (-not $moduleInstalled) { | |
Write-Host "Module '$ModuleName' is not installed. Installing..." |
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
param( | |
[Parameter(Mandatory=$true)] | |
[string]$ModuleName, | |
[switch]$Force | |
) | |
Write-Host "Checking if module '$ModuleName' is installed..." | |
$moduleInstalled = Get-Module -Name $ModuleName -ListAvailable |
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
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$moduleName | |
) | |
# Check if the module is imported | |
$moduleImported = Get-Module -Name $moduleName -ErrorAction SilentlyContinue | |
if ($moduleImported) { | |
Write-Host "Unimporting module '$moduleName'..." |
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
<# | |
.SYNOPSIS | |
Registers a new container type in a consumer tenant. | |
.DESCRIPTION | |
This script connects to SharePoint Online and registers a new container type. | |
.PARAMETER SpoAdminUrl | |
SharePoint Online Central Administration URL. | |
.PARAMETER ContainerTypeName | |
Name of the container type to register. | |
.PARAMETER EntraAppId |
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
<# | |
.SYNOPSIS | |
This script generates a JWT token and accesses a token from a consumer tenant for registering a container type. | |
.DESCRIPTION | |
This script is used to generate a JWT token using a private key certificate and then use that token to access an access token from a consumer tenant. | |
It then registers the container type in the consumer tenant using the obtained access token. | |
.PARAMETER ClientId | |
Specifies the Entra ID application client Id. |
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
<# | |
.SYNOPSIS | |
Script to create a new list or document library in SharePoint Online. | |
.DESCRIPTION | |
This script connects to SharePoint Online using the specified SiteURL and creates a new list or document library based on the provided parameters. | |
.PARAMETER SiteURL | |
The URL of the SharePoint site where the list or document library will be created. |