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
# PublicActivity Concern to allow custom activities to be created when certain triggers occur. | |
# | |
# Usage Example: | |
# | |
# class Challenge < ActiveRecord::Base | |
# include Eventable | |
# eventable :after_save => [{ | |
# key: 'challenge.after_publish', | |
# when: "self.public_changed? && self.public?", | |
# recipients: 'self.potential_members' |
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() { | |
'use strict'; | |
/** | |
* @ngdoc directive | |
* @name hsBackButton | |
* @module humansized.directives.backButton | |
* @restrict A | |
* | |
* @description | |
* |
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() { | |
'use strict'; | |
/** | |
* @ngdoc directive | |
* @name stripHtml | |
* @module humansized.directives.stripHtml | |
* @restrict A | |
* | |
* @description | |
* |
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
angular.module('app.directives') | |
.run(function($rootScope, $templateCache) { | |
$rootScope.$on('$routeChangeStart', function(event, next, current) { | |
if (typeof(current) !== 'undefined') { | |
/* | |
Once Angular adds something to its template cache it can render slightly different | |
the next time it is recalled. This can break functionality that expects the CSS of elements | |
to be exactly as it was coded (for example parallax). To prevent a specific file from being added | |
to your template cache you can remove it as needed this way: | |
*/ |
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 directive creates a dismissible message, which can either reappear each | |
* page refresh or appear only until it is dismissed by setting a cookie. | |
* | |
*##### Examples | |
* | |
* <div dismissible(data-title='NOTE' data-persist-dismiss > | |
* click the button to dismiss me! | |
* </div> | |
* |
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
// create a chart | |
var columnChart = d4.baseChart() | |
// mix in a feature to the chart | |
.mixin([{name: 'bars', feature: d4.features.stacked-shapes-series}]) | |
// when using the feature apply a filter to the rects. | |
.using('bars',function(bar){ | |
bar.svgFilter('feGaussianBlur', function(filter){ | |
filter |
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
int bytesRead = 0; | |
boolean isPinSet; | |
byte stored[2]; | |
void setup() | |
{ | |
Serial.begin(57600); | |
} |
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> | |
<script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
<title>barStack</title> | |
<style> | |
.axis text { | |
font: 10px sans-serif; | |
} | |
.axis path, .axis line { |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html> | |
<head> | |
<title>Simple Radar Chart</title> | |
<link rel="stylesheet" href="style.css"/> | |
<script src="http://mbostock.github.com/d3/d3.js?2.5.0"></script> | |
<script src="radar.js"></script> | |
</head><body><h1>Simple Radar Chart</h1> | |
<div id="viz"> | |
</div> |
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 WizardController < ApplicationController | |
session :cookie_only => false, :only => :create | |
before_filter :determine_site_by_domain, :except=> [:upload_page_photo,:create_agent_logo,:index,:content,:customize,:pricing,:new_site, :next_step, :previous_step,:create_site, :brand_select] | |
before_filter :check_domain_in_admin | |
skip_before_filter :verify_authenticity_token, :only => [:upload_page_photo,:create_agent_logo] | |
#before_filter :verify_upload, :only => [:next_step_remote, :previous_step_remote] | |
#after_filter :set_button_positioning #req'd for IE7 with ajaxy goodness | |
layout 'wizard' | |
def new_site |