This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'execjs' | |
class HandlebarsFilter < Filter | |
class << self | |
def contents | |
@@contents ||= [File.read("headless-ember.js"), File.read("ember.js")].join("\n") | |
end | |
def context | |
@@context ||= ExecJS.compile(contents) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React, {Component, Element, PropTypes} from 'react' | |
import classNames from 'classnames' | |
import pure from 'recompose/pure' | |
import merge from 'lodash/merge' | |
import {createStyleSheet} from 'jss-theme-reactor' | |
import Logger from '../../util/Logger' | |
import {capitalizeFirstLetter} from '../../util/strings' | |
type DefaultProps = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window) { | |
// This library re-implements setTimeout, setInterval, clearTimeout, clearInterval for iOS6. | |
// iOS6 suffers from a bug that kills timers that are created while a page is scrolling. | |
// This library fixes that problem by recreating timers after scrolling finishes (with interval correction). | |
// This code is released in the public domain. Do with it what you want, without limitations. I do not promise | |
// that it works, or that I will provide support (don't sue me). | |
// Author: rkorving@wizcorp.jp | |
var timeouts = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<!-- NOTES | |
Demo - uses IOS native scroll available in IOS5, but sidestep the document-bounce behavior. Tested on iPad 1, using IOS 5.1. | |
This approach uses a set of 3 nested divs. | |
OuterDiv -- fixed height, width, overflow-scrolling: touch; | |
MiddleDiv -- fixed height width, overflow-scrolling: touch; fits inside OuterDiv | |
InnerDiv -- fixed height width, bigger than MiddleDiv, so it kicks in the overflow behavior |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! LAB.js v1.0.3 (c) Kyle Simpson MIT License */ | |
/* INCLUDE THE MINIFIED LAB.js CODE HERE */ | |
$LAB | |
.script('https:'==document.location.protocol?'https://ssl':'http://www')+'.google-analytics.com/ga.js') | |
.wait(function(){ | |
var scripts = document.getElementsByTagName("script"), | |
src, i, len, | |
acct = "UA-XXXXX-X", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @flow | |
import React, {Element, PropTypes} from 'react' | |
import pure from 'recompose/pure' | |
import {createStyleSheet} from 'jss-theme-reactor' | |
import classNames from 'classnames' | |
import Logger from '../../../util/Logger' | |
type Props = { | |
type: ?string, | |
children: ?Element<any> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component, PropTypes } from 'react'; | |
import verge from 'verge'; | |
import { Motion, spring } from 'react-motion'; | |
import withStyles from 'isomorphic-style-loader/lib/withStyles'; | |
import styles from './styles.scss'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>LABjs Demo</title> | |
</head> | |
<body> | |
<!-- some stuff --> | |
<script src="/js/LAB.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example view implements a simple dragging for mouse events. | |
Wall.DevView = Ember.View.extend | |
mouseDown: (ev) -> | |
ev.dispatcher.lock @, 'mouseMove', 'mouseUp' | |
@_mouseDown = @$().offset() | |
@_mouseDown.pageX = ev.pageX | |
@_mouseDown.pageY = ev.pageY | |
@_mouseDown.dispatcher = ev.dispatcher | |
console.log 'mouseDown' |
NewerOlder