Skip to content

Instantly share code, notes, and snippets.

View elidupuis's full-sized avatar

Eli Dupuis elidupuis

View GitHub Profile
@elidupuis
elidupuis / application.controller.js
Created December 7, 2015 23:53
mailTo anchor tag
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
Error: Assertion Failed: You must use Ember.set() to set the `currentState` property (of <app@component:ui/cell-assignment::ember1408>) to `[object Object]`.
at new Error (native)
at Error.EmberError (http://localhost:4200/assets/vendor.js:27314:21)
at Object._emberMetalCore.default.assert (http://localhost:4200/assets/vendor.js:16033:13)
at SETTER_FUNCTION [as currentState] (http://localhost:4200/assets/vendor.js:30817:34)
at _emberMetalMixin.Mixin.create._transitionTo (http://localhost:4200/assets/vendor.js:56379:44)
at Renderer.willDestroyElement (http://localhost:4200/assets/vendor.js:23700:12)
at Renderer.remove (http://localhost:4200/assets/vendor.js:23668:10)
at Object._emberMetalMerge.default.destroyElement (http://localhost:4200/assets/vendor.js:59776:21)
at Object._emberMetalMerge.default.cleanup (http://localhost:4200/assets/vendor.js:59768:25)
@elidupuis
elidupuis / README.md
Created December 6, 2012 21:41
D3 + Albers + zoom behavior

Alberta Aboriginal Treaty Lands.

@elidupuis
elidupuis / jquery.matchWidth.js
Created August 10, 2011 21:15
jquery plugin to set the width of an element to the sum of it's children's width
$.fn.matchWidth = function(){
// Prepare
var $this = $(this);
// Action
$this.width(function(){
var w = 0;
$(this).children().each(function(){
w += $(this).outerWidth(true);
});
@elidupuis
elidupuis / purrrify.click.html
Created April 8, 2011 04:31
Usage examples of the jquery.purrrify plugin
<script>
$(function(){
// this will trigger purrrify when $('#myTrigger') is clicked:
$.purrrify({
trigger: { selector: '#myTrigger', event: 'click' }
});
});
</script>
@elidupuis
elidupuis / jquery.equalizeHeights.js
Created February 28, 2011 23:07
Simple plugin to equalize the heights of selected elements
// stolen from http://api.jquery.com/map/
// usage: $('div').equalizeHeights();
$.fn.equalizeHeights = function(){
return this.height( Math.max.apply( this, $(this).map(function(i,e){ return $(e).height() }).get() ) );
}
@elidupuis
elidupuis / jquery_plugin_template.js
Created December 17, 2010 01:26
A base structure to use when building new plugins!
(function($) {
var methods = {
init: function( options ) {
// iterate and reformat each matched element
return this.each(function() {
var $this = $(this),
opts = $.extend({}, $.fn.PLUGIN_NAME.defaults, options),
data = $this.data('PLUGIN_NAME');
@elidupuis
elidupuis / safari_search_input
Created November 18, 2010 21:19
Make Safari render an search input as a regular text input
input[type="search"] { -webkit-appearance: textfield; }
(function($) {
$.fn.thePlugin = function(options) {
// build main options before element iteration:
var opts = $.extend({}, $.fn.thePlugin.defaults, options);
var $this = $(this);
var thePlugin = {
index: 0,
$('#slideshow').qCycle({
toLoad: images,
cycleOpts: {
fx: 'fade',
timeout: 3*1000,
pager: '#pagers'
},
createSlide: function (img) {
var data = img.data('qCycle.slideData');
var slide = $('<div>').addClass('slide').append($(img).attr('alt',data.title));