Skip to content

Instantly share code, notes, and snippets.

Avatar

Eli Dupuis elidupuis

View GitHub Profile
@elidupuis
elidupuis / controllers.application.js
Last active Jun 27, 2019
Ember Animated Tools Error
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@elidupuis
elidupuis / controllers.application.js
Last active Jun 27, 2019
Animated List Selection
View controllers.application.js
import Ember from 'ember';
import move from 'ember-animated/motions/move';
import adjustCSS from 'ember-animated/motions/adjust-css';
import { fadeOut } from 'ember-animated/motions/opacity';
import { easeOut, easeIn } from 'ember-animated/easings/cosine';
const rollUp = function * ({ keptSprites, removedSprites, duration }) {
let [kept] = keptSprites;
for (let sprite of keptSprites) {
let z = removedSprites.length + 1;
@elidupuis
elidupuis / bookmarklet.js
Created May 13, 2011
How to create a bookmarklet with an external js file.
View bookmarklet.js
// use this code as your href attribute on your 'Install this bookmarklet' anchor tag.
// borrowed from http://net.tutsplus.com/tutorials/javascript-ajax/create-bookmarklets-the-right-way/
javascript:(function(){var jsCode = document.createElement('script');jsCode.setAttribute('src', 'http://example.com/path/to/file.js');document.body.appendChild(jsCode);}());
@elidupuis
elidupuis / README.md
Last active Jun 22, 2018
Path from mouse or touch input
View README.md

Simple Drawing Example

Click and drag your mouse (or finger on touch device) to draw a line. A new path is created for each touch or click.

Paths are stored in a nested array; you can inspect the variable in console: session (assuming the example is in it's own window).

@elidupuis
elidupuis / README.md
Last active Jan 2, 2016
The Circles of Life
View README.md

Dev setup

python -m SimpleHTTPServer 8080
sass --watch style.scss:style.css
@elidupuis
elidupuis / README.md
Created Nov 27, 2013
Simple filtering example using Stapes.js and Rivets.js
View README.md

Dependencies managed with Bower:

npm install -g bower
bower install

...Then open up index.html in a browser.

@elidupuis
elidupuis / setup.sh
Last active Dec 25, 2015
Steps to get up and running with Grunt.js, from scratch.
View setup.sh
# install nvm
# see https://github.com/creationix/nvm
# be sure to restart your terminal after this step
curl https://raw.github.com/creationix/nvm/master/install.sh | sh
# install Node
# use nvm. if you cannot, download binary from Node website http://nodejs.org/download/
nvm help
nvm ls-remote
# install a recent version
@elidupuis
elidupuis / index.html
Created Mar 8, 2013
A CodePen by Eli Dupuis. Foundation block-grid - Foundation's block grids are awesome but they only work if all the elements are the same height. This SCSS snippet will allow the elements to be different heights. It works by simply clearing every nth element—based on how many columns you have. You can comment out the SCSS to see how the default …
View index.html
<h1>Using both small and large grids</h1>
<ul class='small-block-grid-2 large-block-grid-4'>
<li><img src='http://placekitten.com/g/200/220' /></li>
<li><img src='http://placekitten.com/g/200/200' /></li>
<li><img src='http://placekitten.com/g/200/280' /></li>
<li><img src='http://placekitten.com/g/200/250' /></li>
<li><img src='http://placekitten.com/g/200/240' /></li>
<li><img src='http://placekitten.com/g/200/270' /></li>
<li><img src='http://placekitten.com/g/200/230' /></li>
@elidupuis
elidupuis / gist:4596282
Last active Dec 11, 2015 — forked from pulkitsinghal/gist:1481376
Import repo from Unfuddle to BitBucket
View gist:4596282
mkdir temp
cd temp
git clone git@yourDomain.unfuddle.com:yourDomain/yourRepoName.git
cd yourRepoName/
git remote rm origin
git remote add origin https://yourUsername@bitbucket.org/yourUsername/yourNewRepoName.git
git remote show origin
git push origin master
cd ../..
rm -rf temp
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
You can’t perform that action at this time.