PhpStorm now bundles WordPress coding style natively, starting from version 8.
- Go to
Project Settings>Code Style>PHP. - Select
Set From...(top right of window) >Predefined Style>WordPress.
No longer need to muck with this import! :)
| #!/usr/bin/env bash | |
| # This script installs brew and chowns the right directories needed to run | |
| # brew as a standard user. Your user should be the owner of /usr/local which | |
| # gets set during the installation of brew. The global homebrew cache directory | |
| # group should be set to 'staff' which is not set during a brew install. This | |
| # script fixes that. | |
| # To begin, you MUST execute this script with your user account while it has | |
| # admin privileges. Once the script completes, you can change your |
| var obj = {b: 3, c: 2, a: 1}; | |
| _.sortKeysBy(obj); | |
| // {a: 1, b: 3, c: 2} | |
| _.sortKeysBy(obj, function (value, key) { | |
| return value; | |
| }); | |
| // {a: 1, c: 2, b: 3} |
| upstream backend { | |
| server 127.0.0.1:3000; | |
| } | |
| server { | |
| listen 80; | |
| access_log /var/log/nginx/yoursite.access.log; | |
| error_log /var/log/nginx/yoursite.error.log; |
| <!doctype html> | |
| <html ng-app="Demo" ng-controller="AppController"> | |
| <head> | |
| <meta charset="utf-8" /> | |
| <title>AngularJS Routing</title> | |
| <style type="text/css"> | |
| a { |
| _.mixin({ | |
| // ### _.objMap | |
| // _.map for objects, keeps key/value associations | |
| objMap: function (input, mapper, context) { | |
| return _.reduce(input, function (obj, v, k) { | |
| obj[k] = mapper.call(context, v, k, input); | |
| return obj; | |
| }, {}, context); | |
| }, | |
| // ### _.objFilter |