Skip to content

Instantly share code, notes, and snippets.

View szalishchuk's full-sized avatar

Sviatoslav Zalishchuk szalishchuk

View GitHub Profile
@avaz
avaz / index.js
Created October 30, 2014 18:26
An approach to Bootstrap Modals in EmberJS using Mixins
import Ember from 'ember';
import ModalSupport from '../mixins/modal-support';
export default Ember.Controller.extend(ModalSupport, {
actions: {
tryModal: function() {
var _this = this;
_this.modalFor({template: 'some-template',
title: 'Some Title'})
@gyllstromk
gyllstromk / ember_handlebars_markdown_helper.js
Last active April 13, 2023 19:33
Render markdown as HTML in Ember via `registerBoundHelper`. This example uses https://github.com/evilstreak/markdown-js.
Ember.Handlebars.registerBoundHelper('markdown', function (content) {
return new Handlebars.SafeString(markdown.toHTML(content));
});
@soswow
soswow / Gruntfile.js
Last active December 14, 2015 10:38
Middleware for handle pushState working inside yeoman development server.
// Generated on 2013-03-01 using generator-webapp 0.1.5
'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
var pushStateHook = function (url) {
var path = require('path');
var request = require('request'); // Need to be added into package.json