This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using EPiServer.Framework; | |
using EPiServer.Framework.Initialization; | |
using EPiServer.ServiceLocation; | |
namespace Business.Initialization | |
{ | |
[InitializableModule] | |
[ModuleDependency(typeof(ServiceContainerInitialization))] | |
public class InitializaCustomRepository : IConfigurableModule | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var through = require("through2"); | |
var gutil = require("gulp-util"); | |
// gulp-filesfound | |
module.exports = function(verbose) { | |
verbose = !!verbose; | |
var found = []; | |
return through.obj(function (file, enc, next) { | |
found.push(file); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<section> | |
<hgroup> | |
<h1>Hello</h1> | |
<h2>World!</h2> | |
</hgroup> | |
<nav> | |
<ul> | |
<li>Foo</li> | |
<li>bar</li> | |
<li>baz</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Immutable = require('immutable'); | |
var EventEmitter = require('events').EventEmitter; | |
var fs = require('fs'); | |
var sourceData = {}; | |
try { | |
sourceData = JSON.parse(fs.readFileSync(__dirname + '/../../sourceData.json', 'utf8')); | |
} catch (ex) { | |
console.warn('Could not find source data file:', ex); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react'); | |
var EventEmitter = require('events').EventEmitter; | |
function component (mixins, render) { | |
if (typeof mixins === 'function') { | |
render = mixins; | |
mixins = []; | |
} | |
if (!Array.isArray(mixins)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Immutable = require('immutable'), | |
React = require('react'), | |
component = require('omniscient'); | |
var data = Immutable.fromJS({ | |
title: 'My list', | |
items: [ 'one', 'two', 'three' ] | |
}); | |
var EditMixin = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var data = Immutable.fromJS({ | |
title: 'My page', | |
posts: [ | |
{ id: 1, title: 'Title 1', tags: ['a', 'b', 'c', 'd', 'e', 'f'] }, | |
{ id: 2, title: 'Title 2', tags: ['a', 'b', 'c', 'd', 'e', 'f'] }, | |
{ id: 3, title: 'Title 3', tags: ['a', 'b', 'c', 'd', 'e', 'f'] }, | |
{ id: 4, title: 'Title 4', tags: ['a', 'b', 'c', 'd', 'e', 'f'] } | |
] | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var net = require('net'); | |
var port = 8001; | |
var socket = new net.Socket(); | |
socket.connect(port, function () { | |
console.log("Connected to", port); | |
}); | |
process.stdin.pipe(socket).pipe(process.stdout); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var component = require('omniscient'); | |
var React = require('react'); | |
var someOtherMixins = require('./someMixins'); | |
var setup = { | |
componentDidMount: function () { | |
// Some setup. | |
event.on('data', console.log.bind(console))); | |
} |
OlderNewer