Skip to content

Instantly share code, notes, and snippets.

View NathalieLarsson's full-sized avatar

Nathalie Festin NathalieLarsson

View GitHub Profile
@NathalieLarsson
NathalieLarsson / gist:7413086
Created November 11, 2013 13:21
Search for append on website
(function () {
var $__append__ = $.fn.append;
var matcher = '*';
$.fn.append = function () {
if (console && this.selector === matcher) console.log.call(console, { el: this, args: Array.prototype.slice.call(arguments) });
$__append__.apply(this, arguments);
};
}());
// Source: http://jsfiddle.net/hMEHB/15/
$(document).ready(function () {
'use strict';
var descenders = {"g": true, "j": true, "p": true, "q": true, "y": true};
$('a').each(function (i, elem) {
var self = $(elem),
textNodes = self.text().split(''),
i = 0;
for (i = 0; i < textNodes.length; i += 1) {
@NathalieLarsson
NathalieLarsson / umbracoConfigRewriteRules
Last active August 29, 2015 14:17
Umbraco Config Redirect
<rewrite>
<rules>
<rule name="Redirect till www.domain.se" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.domain\.se$" negate="true" />
</conditions>
<action type="Redirect" url="http://www.domain.se/{R:1}" />
</rule>
</rules>
Request.ApplicationPath : /virtual_dir
Request.CurrentExecutionFilePath : /virtual_dir/webapp/page.aspx
Request.FilePath : /virtual_dir/webapp/page.aspx
Request.Path : /virtual_dir/webapp/page.aspx
Request.PhysicalApplicationPath : d:\Inetpub\wwwroot\virtual_dir\
Request.QueryString : /virtual_dir/webapp/page.aspx?q=qvalue
Request.Url.AbsolutePath : /virtual_dir/webapp/page.aspx
Request.Url.AbsoluteUri : http://localhost:2000/virtual_dir/webapp/page.aspx?q=qvalue
Request.Url.Host : localhost
Request.Url.Authority : localhost:80
@NathalieLarsson
NathalieLarsson / gist:192e8686540cbd67e0cb24763a9da5bf
Created October 11, 2016 12:57 — forked from perploug/gist:7334403
how to hook into tree menus in V7
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Umbraco.Core;
namespace Meh.App_Code
{
public class ChangeMenu : ApplicationEventHandler
{