Skip to content

Instantly share code, notes, and snippets.

View mikaelbr's full-sized avatar

Mikael Brevik mikaelbr

View GitHub Profile
using System.Linq;
using EPiServer.Web.Hosting;
using MoreLinq;
namespace Business.ImageHandling
{
public class MediaMigration
{
@mikaelbr
mikaelbr / gulp-submodule.js
Last active January 2, 2016 03:59
Possible gulp plugin for having independent sub directories.
var es = require("event-stream"),
path = require("path"),
gulp = gulp("fs");
var dest = module.exports = function (matcher) {
"use strict";
function dest(file, callback) {
if (file.isNull()) return cb(null, file); // pass along
@mikaelbr
mikaelbr / gulp-notify.js
Last active January 2, 2016 13:49
prototype/proof of concept: A mac notification tool for Gulp. See https://github.com/mikaelbr/gulp-notify for full code
// From prototype/proof of concept. See https://github.com/mikaelbr/gulp-notify for full code
var es = require("event-stream"),
path = require("path"),
result = require("lodash.result"),
notifier = require("node-notifier");
module.exports = function (options) {
"use strict";
@mikaelbr
mikaelbr / README.md
Last active January 3, 2016 01:18
Standard Reveal.js theme with BEKK colors and BEKK logo in the bottom right corner.

BEKK Theme for Reveal.js

A standard Reveal.js theme with BEKK colors and a BEKK logo in the bottom left corner.

Installation

From Reveal.js git clone: Copy bekk.scss to the css/theme/source/ directory.

  1. Install Node.js
  2. Install Grunt
@mikaelbr
mikaelbr / gulpfile.js
Created January 14, 2014 20:24
Example gulpfile for complete set-up.
var gulp = require('gulp');
var browserify = require('gulp-browserify');
var concat = require('gulp-concat');
var less = require('gulp-less');
var refresh = require('gulp-livereload');
var lr = require('tiny-lr');
var server = lr();
var minifyCSS = require('gulp-minify-css');
var embedlr = require('gulp-embedlr');
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@mikaelbr
mikaelbr / gulfile.js
Created January 18, 2014 22:20
Example gulpfile with no colors on gulp-mocha
var gulp = require('gulp');
var mocha = require('gulp-mocha');
gulp.task('default', function () {
gulp.src('test/*.js')
.pipe(mocha({
useColors: false
}));
})
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserify = require('gulp-browserify'),
concat = require('gulp-concat'),
embedlr = require('gulp-embedlr'),
refresh = require('gulp-livereload'),
lrserver = require('tiny-lr')(),
express = require('express'),
livereload = require('connect-livereload')
livereloadport = 35729,
@mikaelbr
mikaelbr / 0_reuse_code.js
Created February 10, 2014 13:14
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mikaelbr
mikaelbr / InitializaCustomRepository.cs
Created March 11, 2014 08:33
Override repositories in EpiServer
using EPiServer.Framework;
using EPiServer.Framework.Initialization;
using EPiServer.ServiceLocation;
namespace Business.Initialization
{
[InitializableModule]
[ModuleDependency(typeof(ServiceContainerInitialization))]
public class InitializaCustomRepository : IConfigurableModule
{