Skip to content

Instantly share code, notes, and snippets.

View elidupuis's full-sized avatar

Eli Dupuis elidupuis

View GitHub Profile
@elidupuis
elidupuis / gist:4596282
Last active December 11, 2015 11:48 — forked from pulkitsinghal/gist:1481376
Import repo from Unfuddle to BitBucket
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
@elidupuis
elidupuis / index.html
Created March 8, 2013 06:57
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 …
<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 / setup.sh
Last active December 25, 2015 21:49
Steps to get up and running with Grunt.js, from scratch.
# 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 / README.md
Created November 27, 2013 22:49
Simple filtering example using Stapes.js and Rivets.js

Dependencies managed with Bower:

npm install -g bower
bower install

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

@elidupuis
elidupuis / README.md
Last active January 2, 2016 10:59
The Circles of Life

Dev setup

python -m SimpleHTTPServer 8080
sass --watch style.scss:style.css
@elidupuis
elidupuis / component.json
Last active August 29, 2015 14:00
Combining Cordova deviceready and domready in a Component(1) app
{
"locals": [
"foobar"
],
"dependencies": {
"jb55/domready": "*"
},
"scripts": [
"index.js"
]
@elidupuis
elidupuis / README.md
Last active August 29, 2015 14:00
Cordova cross platform configuration gotchas

Cordova handles A LOT of cross platform issues for us, but not all of them. We can simplify these by using a YML or JSON config file to keep track of the differences so our code can stay slim and maintainable.

This concept is based on this article which I found from this SO answer.

@elidupuis
elidupuis / README.md
Last active January 8, 2023 15:36
Path from mouse or touch input

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 / web-intent.js
Created May 13, 2014 03:23
Simple Cordova WebIntent test function
// https://github.com/InQBarna/WebIntent
function testIntent () {
console.log('testIntent...');
if (window.device) {
console.log('DEVICE mode; testing web intent: startActivity');
var address = 'edmonton alberta';
CDV.WEBINTENT.startActivity({
action: CDV.WEBINTENT.ACTION_VIEW,
@elidupuis
elidupuis / reload-hasmany.js
Created December 5, 2014 21:12
Dynamically reload all hasMany relationships for a model.
/**
* You can use this in a model or afterModel hook...
* see http://emberjs.com/api/data/classes/DS.Model.html#method_eachRelationship
*
* Not really tested or sure if this is a good idea... just had the thought and wanted to record it.
*/
model.eachRelationship(function(name, relationship) {
if (relationship.kind === 'hasMany' && relationship.options.async) {
this.get(name).reload();
}