Skip to content

Instantly share code, notes, and snippets.

View zeppelin's full-sized avatar
🐹

Gabor Babicz zeppelin

🐹
View GitHub Profile
@machty
machty / ember-cli-build.js
Last active November 25, 2022 13:21
Broccoli challenges
/* jshint node: true */
const EmberApp = require('ember-cli/lib/broccoli/ember-app');
const generateWhitelabelIndexes = require('./generate-whitelabel-indexes');
module.exports = function(defaults) {
const app = new EmberApp(defaults, {
// ...all sorts of config
});
@BrianSipple
BrianSipple / ember-addon-essentials.md
Last active April 17, 2017 18:27
Ember Addon Essentials -- A checklist of some of the finer details to keep in mind when developing Ember addons

Ember Addon Essentials

This document is meant to be a brief "checklist" of things to setup for your Ember addon when beginning development in order to have the best possible architecture and workflow out of the gate. For more comprehensive material, the following are bookshelf-caliber:

Filling out package.json

@wecc
wecc / route.js
Last active March 28, 2016 10:32
import Ember from 'ember';
import { all, task, timeout } from 'ember-concurrency';
export default Ember.Route.extend({
serverStatusLoopTask: task(function *() {
let { servers } = this.modelFor('servers');
while (true) {
yield timeout(5 * 1000);
yield all(servers.map(::(this.get('fetchServerStatusTask')).perform));
dependencies:
pre:
- for s in rabbitmq-server couchdb redis-server mysql postgresql ; do sudo service $s stop; done; true
- sudo apt-get update; sudo apt-get install libicu52
- curl --output /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic https://s3.amazonaws.com/circle-support-bucket/phantomjs/phantomjs-2.0.1-linux-x86_64-dynamic
- chmod a+x /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic
- sudo ln -s --force /home/ubuntu/bin/phantomjs-2.0.1-linux-x86_64-dynamic /usr/local/bin/phantomjs
@dotzero
dotzero / clouddown.py
Last active October 3, 2022 03:26
Download all files from CloudApp
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import json
import urllib
import urllib2
from dateutil.parser import parse
@mihai-scurtu
mihai-scurtu / gist:4a488007cfd150f09a4d
Last active August 15, 2018 11:30
Integrating TinyMCE in an ember-cli app

Integrating TinyMCE in an ember-cli app

TinyMCE is a javascript WYSIWYG editor that is highly configurable and has a ton of features and plugins. It integrates with jQuery and, with a bit of work, it can be integrated in your ember-cli app.

Step 1: Install TinyMCE:

bower install --save tinymce

Step 2: Import the required files into your app via broccoli. In order to do that you will need a plugin called broccoli-static-compiler:

Ember.Handlebars.registerBoundHelper('render-dynamic', function (name, context, options) {
// name was passed as a variable, but should be passed to render as a string
options.types[0] = "STRING";
return Ember.Handlebars.helpers.render.call(this, name, context, options);
});
@kristianmandrup
kristianmandrup / Converting libraries to Ember CLI addons.md
Last active April 21, 2023 17:14
Guide to Developing Addons and Blueprints for 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.

@toranb
toranb / promise_mixin.js
Last active August 29, 2015 14:05
a simple promise mixin helper class for ember apps that use vanilla jquery ajax
var PromiseMixin = Ember.Object.create({
xhr: function(url, type, hash) {
hash = hash || {};
hash.url = url;
hash.type = type;
hash.dataType = "json";
hash.cache = false;
return new Ember.RSVP.Promise(function(resolve, reject) {
hash.success = function(json) {
return Ember.run(null, resolve, json);
@staltz
staltz / introrx.md
Last active May 10, 2024 12:08
The introduction to Reactive Programming you've been missing