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
// http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands | |
Raphael.fn.arc = function(startX, startY, endX, endY, radius1, radius2, angle) { | |
var arcSVG = [radius1, radius2, angle, 0, 1, endX, endY].join(' '); | |
return this.path('M'+startX+' '+startY + " a " + arcSVG); | |
}; | |
Raphael.fn.circularArc = function(centerX, centerY, radius, startAngle, endAngle) { | |
var startX = centerX+radius*Math.cos(startAngle*Math.PI/180); | |
var startY = centerY+radius*Math.sin(startAngle*Math.PI/180); | |
var endX = centerX+radius*Math.cos(endAngle*Math.PI/180); |
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
license: gpl-3.0 |
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
require('config/adapters/faye-adapter'); | |
export default DS.FayeAdapter.extend(); |
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
import Ember from 'ember'; | |
export default Ember.Mixin.create({ | |
/* | |
This hook is guaranteed to be executed when the root element of this view has been inserted into the DOM. | |
*/ | |
didInsertElement : function(){ | |
this._super(); | |
Ember.run.scheduleOnce('afterRender', this, this.afterRenderEvent); |
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
`import DS from 'ember-data'` | |
# https://aws.amazon.com/articles/1434 | |
Policy = DS.Model.extend | |
key: DS.attr('string') | |
bucket: DS.attr('string') | |
acl: DS.attr('string') | |
'AWSAccessKeyId': DS.attr('string') | |
'Content-Type': DS.attr('string') |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
theme: Ember.inject.service() | |
// ... | |
}); |
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
/* Basic two stop gradient */ | |
.example-gradient { | |
.linear-gradient(150deg, #eee, #aaa); | |
} | |
/* Outputs */ | |
.example-gradient { | |
background: -webkit-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -moz-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -ms-linear-gradient(150deg, #EEE 0%, #AAA 100%); | |
background: -o-linear-gradient(150deg, #EEE 0%, #AAA 100%); |
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
(function() { | |
/*global Ember*/ | |
/*global DS*/ | |
/*global io*/ | |
/*global _*/ | |
'use strict'; | |
var RSVP = Ember.RSVP; | |
var get = Ember.get; |
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
App.ApplicationSerializer = DS.RESTSerializer.extend({ | |
/** | |
The current ID index of generated IDs | |
@property | |
@private | |
*/ | |
_generatedIds: 0, | |
/** | |
Sideload a JSON object to the payload |
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
Here is a simple jQuery plugin to make a table header fixed on top of a div when this is scrolled. | |
Using the code from twitter bootstrap documentation page, this code is customized for table header. | |
Create the table with following layout - | |
<div class="row fixed-table"> | |
<div class="table-content"> | |
<table class="table table-striped table-fixed-header" id="mytable"> | |
<thead class="header"> | |
<tr> | |
<th>Email Address</th> |
OlderNewer