Skip to content

Instantly share code, notes, and snippets.

Thor Jakobsen dunston

Block or report user

Report or block dunston

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View React javascript snippets
{
/*
// 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 / FlattenHierachy
Created Sep 11, 2014
Finding all sub controls
View FlattenHierachy
// 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));
@dunston
dunston / web.config
Created Mar 21, 2013
Sitecore ECM 2.0 MVC binding redirection
View web.config
<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 Oct 1, 2012
Msdeploy package from vs2012
View Website.csproj
<?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>
View web.config.Sitecore
<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
Html for my app_offline.htm
View 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){
You can’t perform that action at this time.