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
App.Chart = Ember.View.extend({ | |
tagName: 'svg', | |
reScale: function() { | |
d3.selectAll( this.svg[0][0].childNodes ).remove(); | |
Ember.run.scheduleOnce( 'afterRender', this, 'build' ); | |
}, | |
didInsertElement: function() { | |
var that = this; | |
$( window ).on( 'resize', function() { | |
Ember.run.debounce( that, that.reScale, 1000 ); |
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
add_filter('flexslider_hg_rotators', 'slider_customizations'); | |
function slider_customizations($args) { | |
if(isset($args['homepage'])) { | |
$options = json_decode($args['homepage']['options']); | |
$options->prevText = '«'; | |
$options->nextText = '»'; | |
$args['homepage']['options'] = json_encode($options); | |
} |
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 express = require('express'); | |
var path = require('path'); | |
var favicon = require('serve-favicon'); | |
var logger = require('morgan'); | |
var cookieParser = require('cookie-parser'); | |
var bodyParser = require('body-parser'); | |
var stormpath = require('express-stormpath'); | |
var routes = require('./routes/index'); | |
var users = require('./routes/users'); |
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
/** Tested in node v0.10.34 | |
** This will probably fail in older versions of IE, because IE. | |
function zipper(/** someArrays, {key:name,value:name} **/) { | |
var args = Array.prototype.slice.call(arguments), | |
arrs = args.slice(null, args.length - 1), | |
item = args.slice(-1)[0], | |
keys = []; | |
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
// Ember Charts Rendered template output to work with Glimmer. | |
Ember.TEMPLATES["chart"] = Ember.HTMLBars.template((function() { | |
return { | |
meta: { | |
"revision": "Ember@1.13.9", | |
"loc": { | |
"source": null, | |
"start": { | |
"line": 1, | |
"column": 0 |
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 config = require(''); // Config file containing DB credentials | |
var mysql = require('mysql'); | |
var Promise = require('bluebird'); | |
Promise.promisifyAll(require("mysql/lib/Connection").prototype); | |
Promise.promisifyAll(require("mysql/lib/Pool").prototype); | |
var pool = mysql.createPool(config.dbConfig); | |
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 _removeAccountFromGroup(account, group) { | |
var href = new Buffer(group, 'base64').toString('utf8'); | |
function findByGroupId(membership, callback) { | |
return callback(membership.group.href === href); | |
} | |
return Promise.fromNode(function(callback) { | |
return account.getGroupMemberships(function(err, memberships) { |
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
add_action( 'genesis_doctype', 'prefix_do_doctype' ); | |
function prefix_do_doctype() { | |
?><!DOCTYPE html> | |
<html class="no-js" <?php language_attributes( 'html' ); ?>> | |
<head <?php echo genesis_attr( 'head' ); ?>> | |
<meta charset="<?php bloginfo( 'charset' ); ?>" /> | |
<?php | |
} | |
add_action( 'after_setup_theme', 'prefix_remove_doctype' ); |
OlderNewer