Skip to content

Instantly share code, notes, and snippets.

View bjarnef's full-sized avatar

Bjarne Fyrstenborg bjarnef

View GitHub Profile
@gazlu
gazlu / backup-localdb-database.bat
Created December 6, 2016 18:44
Backup SQL Server localdb database with sqlcmd
sqlcmd -E -S "(localdb)\v11.0" -q "BACKUP DATABASE <DBNAME> TO DISK='<DRIVE>:\<FOLDER_PATH>\<BACKUP_FILE_NAME>.bak'"
// 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) {
@kevinblake
kevinblake / gist:4000628
Created November 2, 2012 11:50
Rebuild Examine Indexes on Application Start
using System.Collections.Generic;
using Examine;
using umbraco.businesslogic;
namespace MyApplication
{
public class ExamineIndexRebuild : ApplicationStartupHandler
{