git format-patch -1 <sha>
OR
git format-patch -1 HEAD
git apply --stat file.patch
# show stats.
git apply --check file.patch
# check for error before applying
# Set variables | |
echo UMBRACO 9 DEMO INSTALL | |
demoNameDefault='umbracov9-demo-'$RANDOM | |
# Get the demo name from the user | |
echo | |
echo Demo name should be only contain alphanumerics and hyphens. It Can''t start or end with hyphen. It should be less than 15 characters in length and globally unique. This will be the name of your web app. | |
read -p "Enter demo name [$demoNameDefault]: " input | |
demoName="${input:-$demoNameDefault}" | |
echo Demo Name: $demoName |
<Project Sdk="Microsoft.NET.Sdk.Web"> | |
<PropertyGroup> | |
<TargetFramework>netcoreapp2.0</TargetFramework> | |
<UserSecretsId>DancingGoatGcp</UserSecretsId> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.3" /> | |
<PackageReference Include="KenticoCloud.Delivery" Version="4.12.0" /> |
@model EmmTi.KenticoCloudConsumer.EnhancedDeliver.Sample.Models.SampleViewModel | |
<div class="article-tile article-tile-large"> | |
<div class="col-md-12 col-lg-6"> | |
<a href="@Url.Action("Show", "Articles", new { id = Model.System.Codename })"> | |
<img src="@Model.TeaserImage.Url" class="article-tile-image" alt="@Model.System.Name" /> | |
</a> | |
</div> | |
<div class="col-md-12 col-lg-6"> | |
<div class="article-tile-date"> |
using System; | |
using System.Collections.Generic; | |
using System.Configuration; | |
using System.Linq; | |
using System.Runtime.Caching; | |
using System.Web; | |
using SuzieT.Kentico.WebApp.Interfaces; | |
namespace SuzieT.Kentico.WebApp.Helpers | |
{ |
-- INSTRUCTIONS: | |
-- 1. Replace custom_database with the actual database name (Use a replace all on custom_database) | |
-- 2. Change @BackUpFileName to the actual location | |
-- 3. Change parameters for @DbUser & @LoginPassword | |
-- ============================ | |
-- Restore [custom_database] | |
-- ============================ | |
DECLARE @BackUpFileName varchar(100), @DbUser varchar(100), @LoginPassword varchar(100); |
ALTER PROCEDURE getNodes | |
@isActive bit | |
AS | |
BEGIN | |
-- Declare a single column table to be used as a single dimension array | |
DECLARE @activeNodes TABLE (id int) | |
-- Only if the following condition is satisfied, 1070 will be added to the pseudo-array | |
IF @isActive = 1 | |
INSERT INTO @activeNodes(id) VALUES (1070) |
CREATE PROCEDURE getNodes | |
@isActive bit | |
AS | |
BEGIN | |
-- Declare a single column table to be used as a single dimension array | |
DECLARE @activeNodes TABLE (id int) | |
-- Only if the following condition is satisfied, 1070 will be added to the pseudo-array | |
IF @isActive = 1 | |
INSERT INTO @activeNodes(id) VALUES (1070) |