Skip to content

Instantly share code, notes, and snippets.

View jmyrland's full-sized avatar

Jørn A. Myrland jmyrland

View GitHub Profile
@jmyrland
jmyrland / .readme.md
Last active January 20, 2016 10:17
Episerver 7 - Adaptive images

Adaptive Images for Episerver 7

  1. Add AdaptiveImageHandler.cs to your project.

  2. In the EPiServerFramework.config find the virtualPathProvider called Global Files and set useRouting="false", like so:

     <add showInFileManager="true" virtualName="Global Files" virtualPath="~/Global/"
       bypassAccessCheck="false" indexingServiceCatalog="Web" useRouting="false"
       customFileSummary="~/FileSummary.config" name="SiteGlobalFiles"
       type="EPiServer.Web.Hosting.VirtualPathVersioningProvider, EPiServer" />
    
@jmyrland
jmyrland / .readme.md
Last active July 12, 2019 10:15
Off canvas menu with touch handles.

Off canvas menu with touch handles.

View an example here.

This example is based on elements of this post.

Incliudes a OffCanvasMenuController to handle touch events bound to the off canvas menu. For example when swiping from the outer left side to the right, the left off canvas menu is dragged along.

Example usage

@jmyrland
jmyrland / Dockerfile
Created May 15, 2015 13:46
Docker mounted volume removes node_modules
# Set the base image to stable version of node
FROM node:0.12.2
# Install nodemon
RUN npm install -g nodemon
# Provides cached layer for node_modules
COPY package.json /tmp/package.json
RUN cd /tmp && npm install --production
RUN mkdir -p /app && cp -a /tmp/node_modules /app/
@jmyrland
jmyrland / .readme.md
Created March 3, 2015 09:41
Simple exception logging for ASP.NET MVC

Simple exception logging for ASP.NET MVC

  1. Add the ExceptionUtility.cs and ErrorHandlerAttribute.cs
  2. Add the ErrorHandlerAttribute to your base controller to start logging errors. Like:
  [ErrorHandler]
  public class BaseController : Controller
  {
 // ...
@jmyrland
jmyrland / test.js
Last active January 19, 2024 18:51
Socket-io load test?
/**
* Modify the parts you need to get it working.
*/
var should = require('should');
var request = require('../node_modules/request');
var io = require('socket.io-client');
var serverUrl = 'http://localhost';