Skip to content

Instantly share code, notes, and snippets.

View TimGeyssens's full-sized avatar

Tim Geyssens TimGeyssens

View GitHub Profile
#include <MIDI.h>
#include <SoftwareSerial.h>
#include <DFPlayer_Mini_Mp3.h>
#include <math.h>
SoftwareSerial mySerial(11, 10); // RX, TX
MIDI_CREATE_DEFAULT_INSTANCE();
bool isMp3Mode = false;
@warrenbuckley
warrenbuckley / SomeTreeController.cs
Last active October 28, 2016 09:39
This is a way to determine what version of Umbraco is being used & conditionally change Angular views or logic based on that.
public static bool UseLegacyEditors()
{
return UmbracoVersion.Current < new Version(7, 4);
}
var someRoutePath = Core.Configuration.UseLegacyEditors()
? "/myApp/treeAlias/edit-legacy/" + someObj.Id
: "/myApp/treeAlias/edit/" + someObj.Id;
@leekelleher
leekelleher / MarkdownPropertyDescriptions.cs
Last active February 5, 2020 06:52
Umbraco - Converts a property's description using markdown
using Umbraco.Core;
using Umbraco.Web.Editors;
namespace Our.Umbraco
{
public class MyBootstrapper : ApplicationEventHandler
{
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
EditorModelEventManager.SendingContentModel += (sender, e) =>
@rbaty-barr
rbaty-barr / ExamineIndex.config
Last active February 15, 2017 12:18
this ezSearch takes into account a multi searcher... just a starting point
<?xml version="1.0"?>
<!--
Umbraco examine is an extensible indexer and search engine.
This configuration file can be extended to create your own index sets.
Index/Search providers can be defined in the UmbracoSettings.config
More information and documentation can be found on CodePlex: http://umbracoexamine.codeplex.com
-->
<ExamineLuceneIndexSets>
<IndexSet SetName="PDFIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/PDFs" />
@jamiepollock
jamiepollock / package.manifest
Created September 19, 2014 16:32
A custom umbraco directive which allows the user to bing an umb-editor to a property whilst providing a custom config.
{
javascript: [
'~/App_Plugins/YourPackage/your.controller.js',
'~/App_Plugins/YourPackage/umbraco-editor-with-config.js',
]
}
@dannydrogt
dannydrogt / MyApplication.cs
Last active June 24, 2020 06:57
Filter Allowed Document Types and Templates in Umbraco
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using System.Web;
using Umbraco.Core;
using Umbraco.Web;
using Umbraco.Web.Models.ContentEditing;