Skip to content

Instantly share code, notes, and snippets.

@fcingolani
fcingolani / blackup.sh
Created November 21, 2013 20:04
Blackup. Simple filesystem and mysql database backup script. Usage: ./blackup.sh blackup_plan.sh
#!/bin/bash
# Requirements:
# - mysqldump
echo "Running backup plan $1";
source $1;
database_dump_file="$backup_dir/database.sql";
@jkarsrud
jkarsrud / BundleInstall.md
Last active May 27, 2020 08:51
How to use ASP.NET Bundling and Minifications in Umbraco

How to use ASP.NET Bundling and Minifications in Umbraco

Using the ASP.NET bundling and minifications is pretty straight forward, but here is a small guide that take care of a few gotchas when implementing bundles in your Umbraco project.

Installing ASP.NET Bundling and Minifications

ASP.NET Bundling and Minifications is part of the Microsoft ASP.NET Web Optimization Framework and is installed via NuGet;

PM> Install-Package Microsoft.AspNet.Web.Optimization

Once this is done, you need to create a BundleConfig.cs in your App_Start1 folder. This is where you register your different bundles. It can be extremely simple, or it can be more complex, but the gist of it is this;

anonymous
anonymous / MemberLogin.cshtml
Created December 19, 2012 11:47
A Umbraco 4.10+ SurfaceController based Login Form
@model UmbracoLogin.MemberLoginModel
@if (User.Identity.IsAuthenticated)
{
<p>Logged in: @User.Identity.Name</p>
<p>@Html.ActionLink("Log out", "MemberLogout", "MemberLoginSurface")</p>
}
else
{
using (Html.BeginUmbracoForm("MemberLogin", "MemberLoginSurface"))
{