Skip to content

Instantly share code, notes, and snippets.

View baywet's full-sized avatar
Out until June 8th

Vincent Biret baywet

Out until June 8th
View GitHub Profile
baywet / build.gradle
Created February 7, 2024 19:42 — forked from maisarissi/build.gradle
repositories {
// Use Maven Central for resolving dependencies.
dependencies {
// Use JUnit test framework.
testImplementation libs.junit
// This dependency is used by the application.
baywet / app.go
Last active November 29, 2021 17:49
msgraph go sdk fluent api demo
// indexes into the users and message folders collections using the fluent style API to list out messages
// sends a message using the models and the fluent style API POST method
requestBody := msgraphsdk.NewSendMailRequestBody()
message := msgraphsdk.NewMessage()
subject := "Meet for lunch?"
body := msgraphsdk.NewItemBody()
baywet / app.go
Created November 18, 2021 21:02
ms graph go beta sdk
import (
azidentity ""
a ""
// this line imports the v1.0 SDK
msgraphsdk ""
// this line imports the beta SDK
msgraphbetasdk ""
baywet / app.go
Last active November 23, 2021 13:22
Sample for the go sdk preview announcement
import (
azidentity ""
a ""
msgraphsdk ""
// the following block creates a new device code credential using the Azure Identity library which will be used by the authentication provider to obtain an access token for requests
cred, err := azidentity.NewDeviceCodeCredential(&azidentity.DeviceCodeCredentialOptions{
baywet / testScript.ps1
Created September 8, 2021 13:36
AGS request payload compression test
$accessToken = "<AccessTokenWithMailSendPermission>"
$srcFileName = "PathToRequestPayloadUncompress-SeeOtherFile"
$destFileName = "APath"
$srcFileStream = New-Object System.IO.FileStream($srcFileName,([IO.FileMode]::Open),([IO.FileAccess]::Read),([IO.FileShare]::Read))
$destFileStream = New-Object System.IO.FileStream($destFileName,([IO.FileMode]::Create),([IO.FileAccess]::Write),([IO.FileShare]::None))
$gzip = New-Object System.IO.Compression.GZipStream($destFileStream,[System.IO.Compression.CompressionMode]::Compress)
Invoke-WebRequest -UseBasicParsing -Uri "" `
baywet / MS Graph Change Notifications useful links.txt
Created October 1, 2020 12:23
Microsoft Graph Change Notifications useful links
import { ACTIVITY_TYPE_DIGITAL, DIGITAL_CATEGORY_EMAIL } from '../../definitions';
export const modelName = 'email';
export const modelVersion = '1';
export const explanation = {
'Calculations take into account the direct emissions associated with the email infrastructure worldwide.',
links: [
label: ' (2015)',
Install-PackageProvider -Name NuGet -Force -Scope "CurrentUser"
if($version -ne "") {
Install-Module SharePointPnPPowerShellOnline -Scope "CurrentUser" -RequiredVersion $version -Verbose -AllowClobber -Force
} else {
Install-Module SharePointPnPPowerShellOnline -Scope "CurrentUser" -Verbose -AllowClobber -Force
This file has been truncated, but you can view the full file.
0 warn pnpm:
message: "using --force I sure hope you know what you are doing"
prefix: "C:\\sources\\gitttl\\SiteCreation\\SiteCreationForm"
1 info pnpm:
message: "Installing a flat node_modules. Use flat node_modules only if you rely on buggy dependencies that you cannot fix."
prefix: "C:\\sources\\gitttl\\SiteCreation\\SiteCreationForm"
2 debug pnpm:package-json:
name: "site-creation-form"
private mapNpmCommand(command: string, packagesDevExact: string[],
packagesDevInexact: string[], packagesDepExact: string[], packagesDepInexact: string[],
packagesDepUn: string[], packagesDevUn: string[]): void {
const npmReduceRegex: RegExp = /npm\s+(i|un)\s+([\w\d\@\/\.-]+)\s+(-D|-S)?\s?(-E)?/gm;
const npmReduceMatch: RegExpExecArray | null = npmReduceRegex.exec(command);
const packageNameGroupId: number = 2;
const installCommandGroupId: number = 1;
const dependencyCategoryGroupId: number = 3;
const exactGroupId: number = 4;
if (npmReduceMatch) {