This file contains hidden or 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
$TenantID = 'CUSTOMERTENANT.ONMICROSOFT.COM' | |
$ApplicationId = "YOURPPLICTIONID" | |
$ApplicationSecret = "YOURAPPLICATIONSECRET" | |
$body = @{ | |
'resource' = 'https://graph.microsoft.com' | |
'client_id' = $ApplicationId | |
'client_secret' = $ApplicationSecret | |
'grant_type' = "client_credentials" | |
'scope' = "openid" |
This file contains hidden or 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
function Create-Slug { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$InputString | |
) | |
# Use a regular expression to remove any characters that are not letters, numbers, or dashes | |
$slug = $InputString -replace '[^\w-]', '' |
This file contains hidden or 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
# Based on https://sccmentor.com/2021/01/11/using-proactive-remediations-to-remove-google-chrome/ | |
# Thank you. | |
try | |
{ | |
$chromeInstalled = Test-Path 'HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\chrome.exe' | |
if ($chromeInstalled -eq 'True') { | |
Write-Host "Google Chrome is installed locally" |
This file contains hidden or 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
<?php | |
namespace App; | |
use Geocoder\Laravel\ProviderAndDumperAggregator as G; | |
class Geocoder | |
{ | |
protected $geocoder; |
This file contains hidden or 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
Route::get('/route-list', function () { | |
Artisan::call('route:list'); | |
return '<pre>'.Artisan::output(); | |
}); |
This file contains hidden or 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
@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1']) | |
@setup | |
// Sanity checks | |
if (empty($host)) { | |
exit('ERROR: $host var empty or not defined'); | |
} | |
if (empty($user)) { | |
exit('ERROR: $user var empty or not defined'); | |
} |
This file contains hidden or 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
@servers(['web' => $user.'@'.$host,'localhost' => '127.0.0.1']) | |
@setup | |
// Sanity checks | |
if (empty($host)) { | |
exit('ERROR: $host var empty or not defined'); | |
} | |
if (empty($user)) { | |
exit('ERROR: $user var empty or not defined'); | |
} |
This file contains hidden or 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
# Bitbucket Pipelines Configuration file | |
# https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html | |
# options: | |
# size: 2x | |
# max-time: 60 | |
pipelines: | |
default: | |
- step: | |
script: | |
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'." |
This file contains hidden or 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
# Bitbucket Pipelines Configuration file | |
# https://confluence.atlassian.com/bitbucket/configure-bitbucket-pipelines-yml-792298910.html | |
# options: | |
# size: 2x | |
# max-time: 60 | |
pipelines: | |
default: | |
- step: | |
script: | |
- echo "This script runs on all branches that don't have any specific pipeline assigned in 'branches'." |
This file contains hidden or 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
<?php | |
namespace App\Models; | |
class Agreement extends BaseModel | |
{ | |
const CREATED_AT = 'CreatedOn'; | |
const UPDATED_AT = 'LastUpdateOn'; | |
/** |
NewerOlder