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
def _stepper_buttons(self): | |
buttons = [] | |
mutes = self._mute_buttons.submatrix[4:8, :1] | |
assigns = self._crossfade_buttons.submatrix[4:8, :1] | |
for mute, assign in izip(mutes, assigns): | |
buttons.extend([mute, assign]) | |
return buttons |
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 Parent(object): | |
def log_message(self, string): | |
self.c_instance.log_message(string) # Calling a C bridge | |
def create_children(self): | |
self.child1 = Child(self) | |
self.child2 = Child2(self) | |
class Child(object): | |
def __init__(self, parent): |
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
# I used to do this with Rabl | |
class BaseController < ApplicationController | |
before_filter @load_active_distributors | |
def load_active_distributors | |
# RABL template uses this | |
@active_distributors ||= Enterprise.distributors_with_active_order_cycles | |
end | |
end |
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
Darkswarm.factory "Loading", -> | |
new class Loading | |
message: null | |
Darkswarm.directive "loading", (Loading)-> | |
scope: {} | |
restrict: 'E' | |
templateUrl: 'loading.html' | |
controller: ($scope)-> | |
window.Loading = Loading |
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
console.log $scope | |
ChildScope {$id: "00F", this: ChildScope, $$listeners: Object, $$listenerCount: Object, $parent: ChildScope…} | |
$id: "00F" | |
$parent: ChildScope | |
accordion: Object | |
checkout: Constructor | |
show: function (name) { | |
this: ChildScope | |
__proto__: ChildScope |
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
.columns.small-12.large-6{"ng-bind-html" => "producer.long_description"} | |
// producer.long_description is <p>text here</p> |
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
Darkswarm.directive "ofnModal", ($modal)-> | |
restrict: 'E' | |
replace: true | |
transclude: true | |
template: "<a>{{title}}</a>" | |
link: (scope, elem, attrs, ctrl, transclude)-> | |
scope.title = attrs.title | |
contents = null |
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
Darkswarm.controller "ForgotCtrl", ($scope, $http, $location, SpreeUser, AuthenticationService) -> | |
$scope.spree_user = SpreeUser.spree_user | |
$scope.path = "/forgot" | |
$scope.sent = false | |
$scope.active = -> | |
$location.path() == $scope.path | |
$scope.select = -> | |
AuthenticationService.select($scope.path) |
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
%ng-include{src: "login.html"} | |
%ng-include{src: "signup.html"} | |
%ng-include{src: "forgot.html"} |
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
Darkswarm.directive "ofnModal", ($modal)-> | |
restrict: 'E' | |
replace: true | |
transclude: true | |
template: "<a>{{title}}</a>" | |
link: (scope, elem, attrs, ctrl, transclude)-> | |
scope.title = attrs.title | |
scope.cancel = -> |
NewerOlder