Skip to content

Instantly share code, notes, and snippets.

View ehsky's full-sized avatar

Erlend Hansen ehsky

  • Stretch Engage
  • Norway
View GitHub Profile
@ehsky
ehsky / pardot-scratchOrg-def.json
Created December 7, 2021 23:32
Scratch org file with pardot features enabled
{
"orgName": "Stretch",
"edition": "Developer",
"features": [
"EnableSetPasswordInApi",
"Pardot"
],
"hasSampleData": true,
"language": "en_US",
"settings": {
@ehsky
ehsky / rounded-cornered-button-OutlookSupport.html
Created December 7, 2021 19:01
A button with rounded corner supported by outlook mail clients
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<div>
<!--[if mso]>
<v:roundrect xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word" href="http://example.com" style="height:36px;v-text-anchor:middle;width:150px;" arcsize="100%" strokecolor="#EB7035" fillcolor="#EB7035">
<w:anchorlock/>
<center style="color:#ffffff;font-family:Helvetica, Arial,sans-serif;font-size:16px;">I am a button &rarr;</center>
</v:roundrect>
<![endif]-->
@ehsky
ehsky / Create-GPID-List.ps1
Last active October 26, 2021 07:39
Creates a txt based list of GPIDs
<#
.SYNOPSIS
Creates a txt based list of GPIDs
.DESCRIPTION
Creates a txt based list of GPIDs
One GPID pr line. Can also add it with single ' before and after for salesforce support.
It provides a file saver window to save to a place of your chosing.
.OUTPUTS
/**
* @description : Multi purpose class for Account Deletion.
* Can be scheduled to run itself, the batch job constructed by this class.
* @author : erlend.hansen@stretch.no | https://trailblazer.me/id/ehansen7
* @group : Consumer, Anonymization, Scheduler, Batch
* @last modified on : 10-26-2021
* @last modified by : erlend.hansen@stretch.no | https://trailblazer.me/id/ehansen7
* @example execute single batch
* Database.executeBatch( new AccountDeleteBatch(), 1);
* @example Schedule batch
@ehsky
ehsky / convertBoolean.cls
Created February 12, 2021 14:29
Convert Integer or String to Boolean in apex
// Test data
Integer intTrue = 1;
Integer intFalse = 0;
String sNumberTrue = '1';
String sNumberFalse = '0';
Boolean bTrue = true;
Boolean bFalse = false;
String capTrue = 'TRUE';
String capFalse = 'FALSE';
String smallTrue = 'true';
@ehsky
ehsky / ToastNotification_Windows10.ps1
Created April 5, 2020 13:28 — forked from altrive/ToastNotification_Windows10.ps1
Windows 10 toast notification sample
$ErrorActionPreference = "Stop"
$notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString()
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null
$template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01)
#Convert to .NET type for XML manipuration
$toastXml = [xml] $template.GetXml()
$toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null
/* Velger fonten for nettsiden */
.wForm, .wFormTitle, .default, .wFormWebPage, .body, .wFormContainer {
font-family: 'lato';
font-weight: 300;
}
#wfTabNav {
color: #000;
}
/* sentrer neste og tilbske knapp */
.wForm .wfPagingButtons, .wForm .actions {