Skip to content

Instantly share code, notes, and snippets.

import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@camskene
camskene / application.controller.js
Last active May 13, 2018 22:09
The Hello World of Ember Todo's
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
addTodo(todo) {
if (!todo) {
return;
}
this.model.pushObject({text: todo});
@camskene
camskene / application.controller.js
Last active February 1, 2016 00:35
Basic Show/Hide
import Ember from 'ember';
export default Ember.Controller.extend({
});
@camskene
camskene / application.controller.js
Last active February 1, 2016 00:34
Closure Actions
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Closure Actions',
value: '',
buttonText: 'click me',
todos: [],
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass
@camskene
camskene / gist:5449308
Last active December 16, 2015 14:29
Hexadecimal to RGB. Converts hex string to rgb string
/**
*
* getRGB("#ffffff")
* rgb(255,255,255)
*
*/
function getRGB(hex) {
// check for hash
hex = (hex.substr(0,1) == "#") ? hex.substr(1) : hex;