This file contains 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 getData() { | |
var deferred = $.Deferred(); | |
$.ajax({ | |
'url': 'http://google.com', | |
'success': function(data) { | |
deferred.resolve('yay'); | |
}, | |
'error': function(error) { | |
deferred.reject('boo'); |
This file contains 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
on: | |
push: | |
branches: | |
- develop | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 |
This file contains 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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<!-- Virtual Directory Setup | |
assign virtualDirPath below a value like '/{path}' | |
Add below to your app code and then prepend routes with virtualDirPath | |
var virtualDirPath = process.env.virtualDirPath || ''; --> |
This file contains 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
/** | |
* Get the width for a single line of text | |
* @param {String} text - the string of text to be measured | |
* @param {Object|HTMLElement} font - optional font styles or node to pull font styles from | |
* @return {Number} the width of the text passed in | |
*/ | |
const expando = 'text-width' + new Date().getTime() | |
const canvas = | |
typeof document === 'undefined' ? null : document.createElement('canvas') | |
const context = canvas && canvas.getContext('2d') |
This file contains 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
// Set up "namespace." | |
var APP = APP || {}; | |
// `Shared settings. | |
//---------------------------------------------------------------------------------------------------- | |
APP.config = APP.config || {}; | |
// How long to keep cache, in minutes. | |
APP.config.cache_duration = APP.config.cache_duration || 15; |
This file contains 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
<?php | |
/** | |
* Name: Attachments Metabox Uploader | |
* Author: Jared Williams - http://new2wp.com | |
* Description: This is for adding a custom metabox to post types which enables you to add/remove | |
* post attachments that you can upload and enter the meta information for right on the edit page. | |
* Version: 0.1.0 | |
* | |
* Notes: In order to add this to a post type you need to find the word 'product' and replace it with * whatever the post type is you want to use it on. | |
*/ |
NewerOlder