Install iTerm 2
Download, unzip and drag to your Applications directory.
https://www.iterm2.com/downloads.html
| /* | |
| This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
| It will generate several classes such as: | |
| .m-r-10 which gives margin-right 10 pixels. | |
| .m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
| .m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
| .p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
| .p-l-40 gives PADDING to the LEFT of 40 pixels |
Download, unzip and drag to your Applications directory.
https://www.iterm2.com/downloads.html
| <?php | |
| /** | |
| * Use * for origin | |
| */ | |
| add_action( 'rest_api_init', function() { | |
| remove_filter( 'rest_pre_serve_request', 'rest_send_cors_headers' ); | |
| add_filter( 'rest_pre_serve_request', function( $value ) { | |
| header( 'Access-Control-Allow-Origin: *' ); | |
| header( 'Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE' ); |
| /** | |
| * Originally wrote this snippet for Suffragette/Pathé campaign (https://apps.facebook.com/inspiring-women) | |
| * | |
| * The campaign app forms a grid of square images pulled from social APIs based on | |
| * particular hashtags. This snippet sets the new width and | |
| * height based on their natural width and height to maintain the aspect ratio. | |
| * Works best for 1:1 aspect ratio but can be modified to accommodate other ratio. | |
| * | |
| * @param Element|Resource img - An image element/resource from DOM | |
| * @param int expected - Expected width or height |
| module.exports = function (grunt) { | |
| // show elapsed time at the end | |
| require('time-grunt')(grunt); | |
| // load all grunt tasks | |
| require('load-grunt-tasks')(grunt); | |
| //MODIFIED: add require for connect-modewrite | |
| var modRewrite = require('connect-modrewrite'); | |
| grunt.initConfig({ |
| //The connect.options.middleware is the relevant part | |
| //Adapted from https://github.com/yeoman/generator-angular/issues/433#issuecomment-37706899 | |
| // Generated on 2014-01-30 using generator-angular 0.7.1 | |
| 'use strict'; | |
| // # Globbing | |
| // for performance reasons we're only matching one level down: | |
| // 'test/spec/{,*/}*.js' | |
| // use this if you want to recursively match all subfolders: |
| filter: blur(5px); /* Someday, sigh ... */ | |
| -webkit-filter: blur(5px); /* Prefixed CSS3 blur filters */ | |
| -moz-filter: blur(5px); | |
| -o-filter: blur(5px); | |
| -ms-filter: blur(5px); | |
| /* filter: url(#blur); Firefox needs SVG */ | |
| filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='10'); /* IE lte 9 */ |
| // Example Use | |
| (function () { | |
| function success() { | |
| console.log("success: ", this.src); | |
| } | |
| function failure() { | |
| console.log("failure: ", this.src); | |
| } |
| var data = { | |
| "name": "root", | |
| "contents": [ | |
| { | |
| "name": "A", | |
| "contents": [ | |
| { | |
| "name": "fileA1", | |
| "contents": [] | |
| } |