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 Microsoft.AspNetCore.Mvc; | |
using Umbraco.Cms.Core.Services; | |
using MimeKit; | |
using Umbraco.Cms.Core.Models; | |
using Umbraco.Cms.Core.IO; | |
namespace UmbracoProject.Controllers | |
{ | |
public class SecureMediaController : Controller | |
{ |
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
dotnet new umbraco -n UmbracoUnattended --connection-string "Server=GORDON\SQLExpress;Database=UmbracoUnattended;User Id=sa;Password=abc123;" | |
cd UmbracoUnattended | |
Set-Item Env:\UMBRACO__CMS__GLOBAL__INSTALLMISSINGDATABASE true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__INSTALLUNATTENDED true | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERNAME "Test" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSEREMAIL "[email protected]" | |
Set-Item Env:\UMBRACO__CMS__UNATTENDED__UNATTENDEDUSERPASSWORD "test123456" | |
dotnet add package Umbraco.TheStarterKit |
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.Cms.Web.Common.PublishedModels; | |
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<ContentModels.BlogPost> | |
@using ContentModels = Umbraco.Cms.Web.Common.PublishedModels; | |
@{ | |
Layout = null; | |
} | |
<html> | |
<head> | |
<meta property="og:title" content="@Model.Header" /> |
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 Jumoo.uSync.BackOffice; | |
using Jumoo.uSync.BackOffice.Handlers; | |
using Jumoo.uSync.BackOffice.Helpers; | |
using Jumoo.uSync.Core; | |
using Jumoo.uSync.Core.Extensions; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Linq; |
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
- powershell: | # generates a hash of all packages.config and saves each on a single line on 'hash.txt' | |
Get-FileHash -Algorithm MD5 -Path (Get-ChildItem packages.config -Recurse) >> hash.txt | |
Write-Host "Hash File saved to $pwd\hash.txt" | |
workingDirectory: src | |
displayName: 'Calculate and save packages.config hash' | |
- task: CacheBeta@0 # speed up builds by caching packages folder | |
inputs: | |
key: nuget|1|$(Agent.OS)|$(Build.SourcesDirectory)\src\hash.txt # hash map generated in previous step | |
path: $(Build.SourcesDirectory)\src\packages |
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 System.Linq; | |
using System.Linq.Expressions; | |
using System.Reflection; | |
using System.Text.RegularExpressions; | |
using Moq; | |
using Umbraco.Core.Models; | |
using Umbraco.ModelsBuilder; | |
namespace Obviuse.Tests |
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
// Filter to take a node id and grab it's name instead | |
// Usage: {{ pickerAlias | ncNodeName }} | |
// Cache for node names so we don't make a ton of requests | |
var ncNodeNameCache = { | |
id: "", | |
keys: {} | |
} | |
angular.module("umbraco.filters").filter("ncNodeName", function (editorState, entityResource) { |
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 Jumoo.uSync.BackOffice; | |
using Jumoo.uSync.BackOffice.Handlers; | |
using Jumoo.uSync.BackOffice.Helpers; | |
using Jumoo.uSync.Core; | |
using Jumoo.uSync.Core.Extensions; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Xml.Linq; |
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
-- Umbraco Clear Old Document Versions To Decrease Database Size And Improve Performance | |
-- http://borism.net/2008/12/16/fixing-a-large-cmspropertydata-table-in-umbraco/ | |
DECLARE @createdDate Datetime = DATEADD(m, -1, getdate()) | |
-- dump logs | |
-- TRUNCATE TABLE umbracolog -- faster if log table is very big and you don't need anything | |
DELETE FROM umbracolog WHERE Datestamp < @createdDate | |
-- clean up old versions | |
DELETE FROM cmsPropertyData WHERE |
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
angular.module("umbraco").config(["$provide", function ($provide) { | |
$provide.decorator("entityResource", function ($delegate, $q) { | |
var getByIdsFn = $delegate.getByIds; | |
$delegate.getByIds = function (ids, type) { | |
var result = getByIdsFn.apply(null, arguments); | |
var loadRegionInfo = function(data, idx, def) { |
NewerOlder