Skip to content

Instantly share code, notes, and snippets.

Eli Dupuis elidupuis

Block or report user

Report or block elidupuis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View LINK tags to document with callback
# Tips for jQuery Bug Patching
# There are some assumptions made here, one being that you're
# set up with some form of "localhost" http server and that it's running.
# -
# - sudo apt-get install apache2
# Get it running:
# On Mac:
elidupuis / jquery_plugin_template.js
Created Dec 17, 2010
A base structure to use when building new plugins!
View jquery_plugin_template.js
(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 = $'PLUGIN_NAME');
View gist:1041037
$('#selling nav a').click(function(){
var what = $(this).attr('href');
if($(this).hasClass('active') != true){
left: '-700px'
}, 500, function() {
brianarn / underscore_conditionals.js
Created May 4, 2010
Conditionals with underscore.js
View underscore_conditionals.js
// A means of using underscore.js to do templates with conditionals
// Inside of underscore's template, it returns a function that uses
// 'with' on a variable named obj, and you can touch into that using
// inline JS and <% %> wrappers
// A template with conditional display of last names:
var good = _.template("Hello: <%= name %> <% if (obj.lastname) { %> <%= lastname %> <% } %>");
// A template that tries to do that, but fails:
var bad = _.template("Hello: <%= name %> <% if (lastname) { %> <%= lastname %> <% } %>");
anasnakawa / inline-image.scss
Created Oct 16, 2012
Base64 inline images function using compass/sass
View inline-image.scss
.some-selector {
background: white #{inline_image("image.png")}
chrislopresto /
Last active Jun 30, 2016
Ember Color Palette Component
  • Technique lifted directly from
  • base.scss comes before color-palette.scss
  • The palette-color scss function lets you do things like border-bottom: 1px solid palette-color('background', 'dark'); or color: palette-color('primary');
BrianSipple /
Last active Apr 17, 2017
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

desandro / jquery.imagesloaded.js
Created Jan 26, 2011 — forked from paulirish/
$.fn.imagesLoaded jQuery plugin
View jquery.imagesloaded.js
// $('',this).imagesLoaded(myFunction)
// execute a callback when all images have loaded.
// needed because .load() doesn't work on cached images
// Modified with a two-pass approach to changing image
// src. First, the proxy imagedata is set, which leads
// to the first callback being triggered, which resets
// imagedata to the original src, which fires the final,
// user defined callback.

High level style in javascript.

Opinions are like assholes, every one has got one.

This one is mine.

Punctuation: who cares?

Punctuation is a bikeshed. Put your semicolons, whitespace, and commas where you like them.

You can’t perform that action at this time.