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
winget install --id=Spotify.Spotify -e ; | |
winget install --id=Microsoft.WindowsTerminal -e ; | |
winget install --id=Microsoft.VisualStudioCode -e ; | |
winget install --id=7zip.7zip -e ; | |
winget install --id=Microsoft.AzureStorageExplorer -e ; | |
winget install --id=ScooterSoftware.BeyondCompare4 -e ; | |
winget install --id=Google.Chrome -e ; | |
winget install --id=Dropbox.Dropbox -e ; | |
winget install --id=Git.Git -e ; | |
winget install --id=Insomnia.Insomnia -e ; |
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
/** | |
* Example usage: | |
* const hotspots = findAllDeep(element, `[slot*="hotspot"]`, 10); | |
*/ | |
const findAllDeep = (parent, selectors, depth = null) => { | |
let nodes = new Set(); | |
let currentDepth = 1; | |
const recordResult = (nodesArray) => { | |
for (const node of nodesArray) { | |
nodes.add(node) |
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
public class FormsValidation : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) | |
{ | |
Umbraco.Forms.Web.Controllers.UmbracoFormsController.FormValidate += UmbracoFormsController_FormValidate; | |
} | |
void UmbracoFormsController_FormValidate(object sender, Umbraco.Forms.Mvc.FormValidationEventArgs e) | |
{ |
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
using OfficeOpenXml; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
namespace WebUI.Infrastructure | |
{ | |
public static class StringUtils | |
{ | |
private static string DuplicateTicksForSql(this string s) |
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
using Umbraco.Core; | |
using Umbraco.Core.Services; | |
using Umbraco.Web.Mvc; | |
using Umbraco.Web.Routing; | |
namespace Our.Umbraco | |
{ | |
public class MyApplication : ApplicationEventHandler | |
{ | |
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) |
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
string[] nodeIds = Model.AncestorOrSelf((Func<dynamic, bool>)(n => n.HasValue("fieldAliasHere"))).GetPropertyValue("fieldAliasHere").Split(','); |
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
using System; | |
using Umbraco.Core; | |
using Umbraco.Core.Persistence; | |
using Umbraco.Core.Persistence.DatabaseAnnotations; | |
namespace Umbraco.Examples | |
{ | |
/// <summary> | |
/// Class that shows the use of creating a new table and inserting a new ArticlePoco. | |
/// This class is only intended for demo'ing and should not be used as it. |
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
<# | |
.SYNOPSIS CreateWebsite - Automatic website creation. | |
.DESCRIPTION Allow to create a website and its ApplicationPool. Some tuning is included | |
.PARAMETER SiteName Defines the display name (in IIS Manager) of the website | |
Mandatory parameter. | |
.PARAMETER Port Defines the listening port for the website | |
Default is "80". | |
.PARAMETER Environment Defines the website environment. | |
This will be added as suffix in the website display name | |
Possible values are "LIVE", "STAGING", "UAT", "QUAL" or "DEV" |
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
using System; | |
using umbraco.interfaces; | |
namespace MyNameSpace | |
{ | |
public class StartupEventHandlers : IApplicationStartupHandler | |
{ | |
public StartupEventHandlers() | |
{ | |
umbraco.macro.Error += macro_Error; |