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
| /* | |
| SQL CMD | |
| -S Server Name | |
| -U Username | |
| -P MyPassword | |
| -d Datbase file to excute SQL script against | |
| -i SQL file to excute | |
| -x Super magic switch that managed to get SQL to run when it bombed first time | |
| */ |
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
| @{ | |
| //Obviously get header from umbraco value | |
| var header = string.empty; | |
| var mainHeader = Model.Content.GetPropertyValue<string>("mainHeader"); | |
| var secondaryHeader = Model.Content.GetPropertyValue<string>("secondaryHeader"); | |
| var nodeName = Model.Content.Name; | |
| //Check if we have mainHeader value, fallback to secondaryHeader | |
| header = !string.IsNullOrEmpty(mainHeader) : mainHeader ? secondaryHeader; |
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
| [03/14/2015 20:00:25 > 73746b: INFO] Try and get 'videos' doctype | |
| [03/14/2015 20:00:55 > 73746b: INFO] Exception Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. | |
| [03/14/2015 20:00:55 > 73746b: INFO] Exception Source: .Net SqlClient Data Provider | |
| [03/14/2015 20:00:55 > 73746b: INFO] Exception StackTrace: at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) | |
| [03/14/2015 20:00:55 > 73746b: INFO] at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) | |
| [03/14/2015 20:00:55 > 73746b: INFO] at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) | |
| [03/14/2015 20:00:55 > 73746b: INFO] at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkC |
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
| [03/14/2015 12:00:04 > 73746b: SYS INFO] Status changed to Initializing | |
| [03/14/2015 12:00:08 > 73746b: SYS INFO] Run script 'uHangout.WebJob.exe' with script host - 'WindowsScriptHost' | |
| [03/14/2015 12:00:08 > 73746b: SYS INFO] Status changed to Running | |
| [03/14/2015 12:00:09 > 73746b: INFO] WEBJOBS_PATH:D:\local\Temp\jobs\triggered\uHangout-WebJob\kh5oaqlx.pvr\ | |
| [03/14/2015 12:00:09 > 73746b: INFO] Created D:\local\Temp\jobs\triggered\uHangout-WebJob\kh5oaqlx.pvr\App_Data | |
| [03/14/2015 12:00:09 > 73746b: INFO] Created D:\local\Temp\jobs\triggered\uHangout-WebJob\kh5oaqlx.pvr\App_Plugins | |
| [03/14/2015 12:00:09 > 73746b: INFO] Created D:\local\Temp\jobs\triggered\uHangout-WebJob\kh5oaqlx.pvr\media | |
| [03/14/2015 12:00:09 > 73746b: INFO] uHangout YouTube Importer | |
| [03/14/2015 12:00:09 > 73746b: INFO] ================================== | |
| [03/14/2015 12:00:12 > 73746b: INFO] ****** |
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
| //Get the same base module that Umbraco uses | |
| var app = angular.module("umbraco"); | |
| //When the module runs/excutes... | |
| app.run(["$rootScope", "notificationsService", "eventsService", function ($rootScope, notificationsService, eventsService) { | |
| //Let's listen for any time formSubmitting | |
| eventsService.on("formSubmitting", function (e, args) { | |
| console.log("e", e); | |
| console.log("args", args); |
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
| $scope.toggleVideo = function(video) { | |
| //Create new JSON object as we don't need full object passed in here | |
| var newVideoObject = { | |
| "id": video.id.videoId, | |
| "title": video.snippet.title | |
| }; | |
| //See if we can find the item or not in the array | |
| var tryFindItem = $scope.model.value.map(function (e) { return e.id; }).indexOf(newVideoObject.id); |
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
| { | |
| "$schema": "http://json-schema.org/draft-04/schema#", | |
| "title": "propertyEditors", | |
| "description": "An array of Umbraco Property Editors", | |
| "type": "object", | |
| "properties": { | |
| "name": { | |
| "description": "The friendly name of the property editor, shown in the Umbraco backoffice", | |
| "type": "string" | |
| }, |
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; | |
| class Program | |
| { | |
| static void Main() | |
| { | |
| // Test 90 seconds ago. | |
| Console.WriteLine(GetPrettyDate(DateTime.Now.AddSeconds(-90))); | |
| // Test 25 minutes ago. | |
| Console.WriteLine(GetPrettyDate(DateTime.Now.AddMinutes(-25))); |
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.Net.Http.Formatting; | |
| using Umbraco.Core; | |
| using Umbraco.Web.Models.Trees; | |
| using Umbraco.Web.Mvc; | |
| using Umbraco.Web.Trees; | |
| namespace UmbracoDiagnostics | |
| { | |
| [Tree("developer", "diagnosticsTree", "Diagnostics")] |
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.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using umbraco.cms.businesslogic.member; | |
| using Umbraco.Core; | |
| using Umbraco.Web.Routing; | |
| namespace MyExampleSite.BusinessLogic |