Do chown / chmod wordpress folder:
$ sudo chown -R :_www wordpress
$ sudo chmod -R g+w wordpress
Add the following line into wp-config.php:
| // 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); | |
| var delay = (function() { | |
| var timer = 0; | |
| return function(callback, ms) { | |
| clearTimeout(timer); | |
| timer = setTimeout(callback, ms); | |
| }; | |
| })(); |
| /** | |
| 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. | |
| */ |
| /** | |
| Print Objects in Javascript | |
| */ | |
| var output = ''; | |
| for (property in object) { | |
| output += property + ': ' + object[property]+'; '; | |
| } | |
| console.log(output); |
| // 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; |
| // Inset, Top Shadow Only | |
| @include box-shadow(inset 0 1px 1px -1px black); |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
| <title>flexbox example - 3 column layout</title> | |
| <meta name="author" content="Gwilym Johnston"> | |
| <link rel="stylesheet" href="base.css" type="text/css" media="screen"> | |
| <style type="text/css"> | |
| .flexbox { |
| /** | |
| author: Ralph Crisostomo | |
| */ | |
| @mixin center-element($width, $height) { | |
| width:$width; | |
| height:$height; | |
| position: absolute; | |
| top: 50%; | |
| left: 50%; |
| .div {margin:10px; position:absolute; top:0; left:0; right:0; bottom:0} |