Skip to content

Instantly share code, notes, and snippets.


Kristian Mandrup kristianmandrup

View GitHub Profile
kristianmandrup / React Reactive Component
Last active Mar 31, 2016
Reactive Component Styles for React
View React Reactive Component
export default Styles {
    constructor(props, state) {
        this.props = props;
        this.state = state;

    generic() {
        return [];
kristianmandrup /
Last active Feb 22, 2017
Aurelia Getting started - walk through



  • Install NVM
  • Install IO.js
  • Install global Node.js utility modules (gulp, jspm, yo)
  • Install RethinkDB
  • Install Koa.js
  • Install Aurelia generator
  • Create Aurelia app via generator
View designer.html
<link rel="import" href="../ace-element/ace-element.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
View mercury-macro.sjs
Trying to get from sth like:
'<cmp:sideBySideEditor />'
// '<div><cmp:MdEditor state="sideBySideEditor"/></div>'
And have the macro output:
// "h('div', MdEditor.render(state.sideBySideEditor))",
kristianmandrup / package.json
Created Oct 2, 2014
Ember-CLI package config for jspm integration :)
View package.json
"jspm": {
"directories": {
"jspmPackages": "vendor"
"configFile": "config/jspm.js",
"dependencies": {
"handlebars": "handlebars.js@1.3.0",
"jquery": "^1.11.0",
"qunit": "github:jquery/qunit@^1.12.0",
"ember-qunit": "github:rwjblue/ember-qunit@0.1.5",
kristianmandrup / Converting libraries to Ember CLI
Last active Apr 25, 2020
Guide to Developing Addons and Blueprints for Ember CLI
View Converting libraries to Ember CLI

Converting libraries to Ember CLI addons

In this guide we will cover two main cases:

  • Ember specific library
  • vendor library

Ember library

The Ember library will assume that Ember has already ben loaded (higher in the loading order) and thus will assume it has access to the Ember API.

kristianmandrup / DSL-usage.js
Last active Aug 29, 2015
Ember DSL idea for ES6 modules
View DSL-usage.js
# models/post.js
import model from 'model-dsl'
Post = model
title: attr('string')
count: attr('integer')
# controllers/post.js
kristianmandrup /
Created Sep 18, 2014
Using AppJs Mobile framework with Ember.js


$ bower install appjs --save

Reference app.js and app.css from your application, f.ex from index.html

<script type="text/javascript" src="/bower_components/appjs/kik-app.js"></script>
<script type="text/javascript" src="/bower_components/appjs/dist/app.css"></script>
kristianmandrup / ember-ratchet-components.txt
Last active Aug 29, 2015
Experiments with Ember Ratchet components
View ember-ratchet-components.txt
// From
<script type="text/x-handlebars" id="components/ra-title">
<h1 class="title">{{yield}}</h1>
<script type="text/x-handlebars" id="components/ra-btn">
<button class="btn pull-{{pos}}">
kristianmandrup / index.html
Created Sep 18, 2014
Ember with Rachet for ember-config generator
View index.html
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
You can’t perform that action at this time.