This file contains hidden or 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
var loopData = [ | |
// Array of Objects | |
] | |
EventRepo.GetEventById(req.body.event_id.toString()) | |
.then(function (data: { rows: {}[] }) { | |
if (data.rows.length === 0) | |
throw new EventRepoError('Event with id:\'' + req.body.event_id + '\' does not exist'); |
This file contains hidden or 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
// Must thank Mark McDonnell of Integralist | |
// http://www.integralist.co.uk/posts/js-recursion.html | |
// Below is his solution to prevent maximum call stack errors caused by calling | |
// functions recursively beyond the stack limit. | |
function tco(f) { | |
var value; | |
var active = false; | |
var accumulated = []; |
This file contains hidden or 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
/** | |
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units | |
* | |
* To overcome this, create media queries that target the width, height, and orientation of iOS devices. | |
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing | |
* the height of element `.foo` —which is a full width and height cover image. | |
* | |
* iOS Resolution Quick Reference: http://www.iosres.com/ | |
*/ | |
This file contains hidden or 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 | |
function free_and_premium() { | |
vc_map( array( | |
"name" => __("Premium", "js_composer"), | |
"base" => "premium", | |
"content_element" => true, | |
"category" => "content>", | |
"show_settings_on_create" => false, | |
"params" => array( | |
// add params same as with any other content element |
This file contains hidden or 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
<div class=" <?php echo esc_attr( $css_class ); ?> <?php echo $responsive_css; ?>"> | |
<span class="headline <?php echo $settings_css; ?>"> | |
<?php echo do_shortcode($content); ?> | |
</span> | |
</div> | |
<?php echo $this->endBlockComment('headings'); ?> |
This file contains hidden or 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
<div data-hmd-full-width data-hmd-min-breakpoint="0" data-hmd-max-breakpoint="767" | |
style="position: relative; background-color: green;"> | |
Example | |
</div> |
This file contains hidden or 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
var React = require('react'); | |
var ReactDOM = require('react-dom'); | |
var Validation = require('../helpers/validation'); | |
var has = require('../helpers/has'); | |
var BasicInput = require('../components/basic-input'); | |
var AppealForm = React.createClass({ | |
validateInput: function(validatorFunc, e) { | |
// Notice position of event data |
This file contains hidden or 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
var getCache = function(url) { | |
var supportsLocalStorage = 'localStorage' in window; | |
// Both functions return a promise, so no matter which function | |
// gets called inside getCache, you get the same API. | |
function getJSON(url) { | |
var promise = $.getJSON(url); |
This file contains hidden or 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
var AWS = require('aws-sdk'); | |
var request = require('request'); | |
var GOOGLE_CLIENT_ID = 'XXXXXX.apps.googleusercontent.com '; | |
var GOOGLE_URL = 'https: //www.googleapis.com/oauth2/v3/tokeninfo?id_token='; | |
var idPoolID = 'us-east-1:XXXXXXX'; | |
var roleArn = 'arn:aws:iam::XXXXXX:role/Cognito_AdminStaffAuth_Role'; | |
var cognitoidentity = new AWS.CognitoIdentity({ | |
region: 'us-east-1' | |
}); | |
module.exports = function(credentials, context) { |
OlderNewer