Skip to content

Instantly share code, notes, and snippets.

View dmarr's full-sized avatar

David Marr dmarr

  • San Francisco, CA
View GitHub Profile
@dmarr
dmarr / gist:5456766
Last active December 16, 2015 15:29
'use strict';
angular.module('phoenixapp')
.directive('body', function ($route) {
return {
restrict: 'e',
link: function postlink(scope) {
scope.$on('$routechangesuccess', function () {
scope.bodyclasses = $route.current.bodyclasses;
});
'use strict';
/*
* This method seems to break the app, use the bare function below instead
*/
//angular.module('phoenixApp', ['articleServices'])
// .controller('StoryCtrl', function($scope, $routeParams, Article) {
// Article.get($routeParams.storyId).then(function (data) {
// $scope.article = data.data;
// });
// });
.factory('Article', function (Restangular) {
var articles = Restangular.all('articles');
return {
get: articles.get,
stream: articles.getList
};
vim    master
Traceback (most recent call last):
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 563, in <module>
main()
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 545, in main
known_paths = addusersitepackages(known_paths)
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 278, in addusersitepackages
user_site = getusersitepackages()
File "/usr/local/Cellar/python/2.7.4/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 253, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
@dmarr
dmarr / gist:5306882
Last active December 15, 2015 18:49
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<!-- Set the viewport width to device width for mobile -->
Site.Article.FIXTURES = [ {
id:1,
body:[
{ type:"Text", value:'&gt;header&lt;some header&lt;header&gt;'},
{ type:"Text", value:"There are a number of reasons why this partnership makes sense for Say" }
]
}];
var store, adapter;
module("Orion Models", {