Skip to content

Instantly share code, notes, and snippets.

View dunston's full-sized avatar

Thor Jakobsen dunston

View GitHub Profile
{
/*
// Place your snippets for JavaScript React here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
"Print to console": {
"prefix": "log",
"body": [
@dunston
dunston / web.config
Created March 21, 2013 14:20
Sitecore ECM 2.0 MVC binding redirection
<configuration>
<runtim>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<bindingRedirect oldVersion="1.0.0.0-2.0.0.0" newVersion="3.0.0.0" />
</dependentAssembly>
</assemblyBinding>
</runtim>
</configuration>
@dunston
dunston / Website.csproj
Created October 1, 2012 11:54
Msdeploy package from vs2012
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="IncludeFiles">
<ItemGroup>
<_files Include="$(SolutionDir)\files\\**\*" />
<FilesForPackagingFromProject Include="%(_files.Identity)">
<DestinationRelativePath>%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
</FilesForPackagingFromProject>
</ItemGroup>
</Target>
@dunston
dunston / web.config.Sitecore
Last active October 6, 2015 02:27
Blog: Log2console
<log4net>
<!-- LOGGING SETTINGS
The file element defines the location of the log files. This location must
be the same as the setting in LogFolder. The file element is a relative or
absolute path that always uses slashes (/) as separators. A valid file
element for a relative path would be:
<file value="/data/logs/log.{date}.{processid}.txt"/>
A valid element for an absolute path would be:
@dunston
dunston / app_offline.htm
Created May 29, 2012 18:27
Html for my app_offline.htm
<!doctype html>
<html>
<head>
<title>Website is down for maintenance</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
(function ($, win){
@dunston
dunston / FlattenHierachy
Created September 11, 2014 08:56
Finding all sub controls
// You maybe has to call EnsureChildControls first
public static Control[] FlattenHierachy(Control root)
{
List<Control> list = new List<Control>();
list.Add(root);
if (root.HasControls())
{
foreach (Control control in root.Controls)
{
list.AddRange(FlattenHierachy(control));