Skip to content

Instantly share code, notes, and snippets.

View rogeruiz's full-sized avatar

Roger Steve Ruiz rogeruiz

View GitHub Profile
rogeruiz /
Last active August 29, 2015 13:57
Oldie Location. Some old fashion HREF wrangling. Seriously, just a simple page refresh.
# For more information see:
location: if Modernizr.history then 'history' else 'oldie'
# IE Ember.Location
# This new location type handles browser support for browsers without support
# for the History API. The Rails app can properly serve a page so when the History
# API isn't supported the Ember application doesn't bother setting a hash or pushing
# a history state. It simply navigates to that location by modifying the location.href
rogeruiz / jshintrc.js
Last active August 29, 2015 13:58
Some sane jshint
// JSHint Default Configuration File (as on JSHint website)
// See for more details
"maxerr" : 50, // {int} Maximum error before stopping
// Enforcing
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.)
"camelcase" : false, // true: Identifiers must be in camelCase
"curly" : true, // true: Require {} for every new block or scope
{{#each fruits}}
{{draggable-list values=fruits}}
rogeruiz / api.js
Created June 21, 2014 18:19 — forked from fwielstra/api.js
/* The API controller
Exports 3 methods:
* post - Creates a new thread
* list - Returns a list of threads
* show - Displays a thread and its posts
var Thread = require('../models/thread.js');
var Post = require('../models/post.js');
<!DOCTYPE html>
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
rogeruiz / SupportsAnimationMixin.js
Created July 8, 2014 11:48
Supports Animating Ember Mixin for use with gigafied's ember-animate
;(function ($, Em, global, undefined) {
var App = global.App;
var rAF = global.Modernizr.prefixed('requestAnimationFrame', window) || function (cb) {
global.setTimeout(cb, 1000 / 60);
App.SupportsAnimationMixin = Em.Mixin.create({
classNames: ['supports-animation'],
rogeruiz / rAFader.js
Last active August 29, 2015 14:03
Simple fade rAF code, tweaked from MDN documentation
window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
var start = null;
var d = $('.js-fader');
// Prep the element for animation
d.css('opacity', 0);
rogeruiz /
Created August 4, 2014 21:52
EmberJS Social Initializer for Controllers [Sketch]
Social = Em.Object.extend
title: null
url: null
image: null
description: null
facebook: (->
endpoint = ''
return endpoint + Em.$.param
app_id: Vidz.get('facebookAppId')
display: 'popup'
rogeruiz / breakpoints.scss
Last active August 29, 2015 14:08
MediaQuery with Breakpoint Support & Grid helpers
// Breakpoints relative to the site design
$watch-page-height: 72px + 82px + 10px;
rogeruiz /
Last active August 29, 2015 14:09
Proof of concept; a feature branch merge and deploy strategy
# Simple script for rebasing your work on top of the sandbox/auth branch.
# This script and process is a work-in-progress and won't solve all problems well
# or even at all. If there are any issues with this script, please update it as you
# see fit. Thanks for playing...
# ./ ~/Developer/vidz charlie/auth