Do chown
/ chmod
wordpress folder:
$ sudo chown -R :_www wordpress
$ sudo chmod -R g+w wordpress
Add the following line into wp-config.php
:
// Reference: | |
// http://stackoverflow.com/questions/7344982/questions-on-backbone-js-with-handlebars-js | |
var ArticleListView = Backbone.View.extend({ | |
el: $('#main'), | |
render: function(){ | |
var js = this.collection.toJSON(); | |
var template = Handlebars.compile($("#some-template").html()); | |
$(this.el).html(template({articles: js})); | |
return this; |
/** | |
Print Objects in Javascript | |
*/ | |
var output = ''; | |
for (property in object) { | |
output += property + ': ' + object[property]+'; '; | |
} | |
console.log(output); |
/** | |
Problem: | |
You have a javascript array that likely has some duplicate values and you would like a count of those values. | |
Solution: | |
Try this schnippet out. | |
*/ | |
var delay = (function() { | |
var timer = 0; | |
return function(callback, ms) { | |
clearTimeout(timer); | |
timer = setTimeout(callback, ms); | |
}; | |
})(); |
// Sample Code | |
// backbone fetch supports Jquery.ajax parameters | |
Model.fetch( { | |
data: {api_key: 'secretkey'}, | |
type: 'POST', | |
success: function(model, response) { | |
console.log('SUCCESS:'); | |
console.log(response); | |