This file contains hidden or 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 deepPlain(array, parentKey, controlArray){ | |
controlArray = _.isUndefined(controlArray) ? [] : controlArray; | |
_.each(array, function(item, key){ | |
if(_.isObject(item)){ | |
if(!_.isString(key)) | |
key = undefined; |
This file contains hidden or 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
enyo.kind({ | |
name: "Storage", | |
kind: "Component", | |
statics: { | |
/* Set the value of item[key] to the stringified version of obj. */ | |
set: function(name, obj){ | |
localStorage.setItem(name, JSON.stringify(obj)); | |
}, | |
This file contains hidden or 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
Backbone.Marionette.TabControl = Marionette.LayoutView.extend({ | |
template : function() { return $('<ul class="nav nav-tabs"></ul><div class="tab-content"></div>'); }, | |
tagName : 'div', | |
className : 'tabbed-content', | |
liView : '<li><a href="#<%= tabid %>" role="tab" data-toggle="tab" data-i18n="<%= tabtitle %>"></a></li>', | |
tabView : '<div role="tabpanel" class="tab-pane" id="<%= tabid %>"></div>', | |
tabs : [], | |
data : {}, | |
defaultTab : 0, |
This file contains hidden or 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
mainRouter = Backbone.Router.extend({ | |
routes : { | |
"templates/*subroute" : "invokeTemplates", | |
}, | |
invokeTemplates: function() | |
{ | |
console.log('>>>>> invokeTemplates'); | |
require(['templateRouter'], function () { | |
App.Routers.Templates = new App.Routers.Templates("templates/"); |
This file contains hidden or 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
// My region controller, it's located where the application it's booted | |
App.mainRegion.on("show", function( view ){ | |
window.onViewRendered( view ); | |
}); | |
// The function which it's been called - The rendered view was passed by the regionManager | |
window.onViewRendered = function (renderedView){ |
This file contains hidden or 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 App = {}; | |
App.Templates = {}; | |
App.Templates.templates = {}; | |
App.Templates.changelog = {}; | |
App.Templates.configs = {}; | |
App.Templates.templates.create = '<div id=rootwizard><ul id=nav-tab><li><a href=#template-selector data-toggle=tab><i class=img-circle>1</i><div data-i18n=templates:insert.template></div></a></li><li><a href=#campaign-editor data-toggle=tab><i class=img-circle>2</i><div data-i18n=templates:insert.design></div></a></li><li><a href=#tab1 data-toggle=tab><i class=img-circle>3</i><div data-i18n=templates:insert.info.tab></div></a></li></ul><div class=tab-content><div class=tab-pane id=template-selector></div><div class=tab-pane id=campaign-editor></div><div class=tab-pane id=tab1><h3 data-i18n=templates:insert.info.title></h3><p data-i18n=templates:insert.info.description></p><form id=form1 class=form-horizontal><div class=row><div class="col-lg-6 col-sm-10 col-sm-6"><div class=form-group><label for=name class="col-sm-4 control-label" data-i18n=templates:insert.info.template></label><div clas |
This file contains hidden or 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
requirejs.config({ | |
// Set burst to prevent any kind of cache | |
urlArgs : "bust=" + (new Date()).getTime(), | |
waitSeconds : 0, | |
paths: { | |
//CORE INCLUDES | |
jquery : 'public/plugins/jquery/jquery.min', | |
backbone : 'public/plugins/backbone/backbone', | |
marionette : 'public/plugins/backbone/backbone.marionette', |
This file contains hidden or 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
require File.join(File.dirname(__FILE__), 'abstract-php-extension') | |
class Php54Mongo < AbstractPhp54Extension | |
init | |
homepage 'http://pecl.php.net/package/mongo' | |
url 'http://pecl.php.net/get/mongo-1.4.4.tgz' | |
sha1 '9cc3b308c6dccb4bbf376fce4bcc2268aa7a7c1d' | |
head 'https://github.com/mongodb/mongo-php-driver.git' | |
def install |
This file contains hidden or 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
require 'digest/md5' | |
def gfm(text) | |
# Extract pre blocks | |
extractions = {} | |
text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
md5 = Digest::MD5.hexdigest(match) | |
extractions[md5] = match | |
"{gfm-extraction-#{md5}}" | |
end |
NewerOlder