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
class App extends React.Component { | |
componentDidMount () { | |
history.listen((location) => { | |
this.props.dispatch({ type: 'ROUTE_CHANGE', location }) | |
}) | |
}, | |
render () { | |
return ( |
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
// this file is designed to freak you out | |
const fs = require('fs') | |
const path = require('path') | |
const hbs = require('handlebars') | |
const cheerio = require('cheerio') | |
!function main() { | |
return process.stdout.write( | |
template()( | |
templateLocals()))}() |
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
define ['require', 'ember'], (req, Ember) -> | |
underscore = Ember.String.underscore | |
Ember.DefaultResolver.extend | |
base: '' | |
# attempts to require the module from the AMD registry | |
resolve: (fullName) -> |
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
brew install bash | |
echo "/usr/local/bin/bash" | sudo tee -a /etc/shells | |
chsh -s /usr/local/bin/bash |
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
var Ember = require('ember'); | |
Ember.Route.reopen({ | |
model: function(params, transition) { | |
var match, name, sawParams, value; | |
for (var prop in params) { | |
if (prop === 'queryParams') { continue; } | |
if (match = prop.match(/^(.*)_id$/)) { | |
name = match[1]; |
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
var Ember = require('ember'); | |
Ember.Route.reopen({ | |
model: function(params, transition) { | |
var match, name, sawParams, value; | |
for (var prop in params) { | |
if (prop === 'queryParams') { continue; } | |
if (match = prop.match(/^(.*)_id$/)) { | |
name = match[1]; |
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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="bower_components/qunit/qunit/qunit.css"> | |
<div id="qunit"></div> | |
<div id="qunit-fixture"></div> | |
<script src="bower_components/jquery/jquery.js"></script> | |
<script src="bower_components/handlebars/handlebars.js"></script> | |
<script src="bower_components/ember/ember.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
Function.prototype.compile = function() { | |
var template = this.toString().split('\n').slice(1,-1).join('\n') + '\n'; | |
return Ember.Handlebars.compile(template); | |
} | |
/*******************************************************/ | |
test('sets first tab found to active', function() { | |
expect(2); | |
var component = this.subject({ |
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 { Component, computed } from 'ember'; | |
export default Component.extend({ | |
tagName: 'ic-tab-panel', | |
attributeBindings: [ | |
'role', | |
'aria-labeledby' | |
], |
OlderNewer