View axios.js
import axios from 'axios' | |
const MAX_REQUESTS_COUNT = 5 | |
const INTERVAL_MS = 10 | |
let PENDING_REQUESTS = 0 | |
// create new axios instance | |
const api = axios.create({}) | |
/** |
View annotation.xml
<annotation> | |
<folder>GeneratedData_Train</folder> | |
<filename>000001.png</filename> | |
<path>/my/path/GeneratedData_Train/000001.png</path> | |
<source> | |
<database>Unknown</database> | |
</source> | |
<size> | |
<width>224</width> | |
<height>224</height> |
View config.yml
defaults: &defaults | |
working_directory: /home/circleci/kotlin-spring-boot-reactjs-poc | |
docker: | |
- image: circleci/openjdk:8-jdk-browsers | |
version: 2 | |
jobs: | |
build: | |
<<: *defaults | |
steps: |
View example.js
// __tests__/example.js | |
jest.mock('fs'); | |
it('should serve as a nice example', () => { | |
const fs = require('fs') | |
// fs can be set up at any point by calling __configureFs. | |
fs.__configureFs({ | |
'/test': { |
View component.txt
accessible | |
adaptTo | |
analyzable | |
cellName | |
childEditConfig | |
class | |
componentGroup | |
container | |
declaredChildEditConfig | |
declaredEditConfig |
View deep-thoughts-plugin.php
<?php | |
/* | |
Plugin Name: Deep Thoughts Functionality | |
Description: API Modifications for my Deep Thoughts React Native app. | |
Author: Jeffrey Gould | |
Version: 0.1 | |
Author URI: http://jrgould.com | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
View gist:51af798dd1e7058625f4
const arr1 = [1,2,3] | |
const arr2 = [4,5,6] | |
const arr3 = [...arr1, ...arr2] //arr3 ==> [1,2,3,4,5,6] |
View curlPackageFilterRules.sh
# Adding include/exclude rules to CQ/AEM package filters through cURL. | |
# Through a simple search, you will find numerous lists of CQ/AEM cURL commands. | |
# However, I haven't seen an example of adding rules to package filters. The | |
# JSON "rules" key takes an array value. You can leave the array empty if you | |
# don't need to include any rules. The array is of JSON objects with a | |
# "modifier" key and value of "include" or "exclude", and a "pattern" key with | |
# your path or regular expression as the value. | |
# create package |
View object-to-form-data.js
// takes a {} object and returns a FormData object | |
var objectToFormData = function(obj, form, namespace) { | |
var fd = form || new FormData(); | |
var formKey; | |
for(var property in obj) { | |
if(obj.hasOwnProperty(property)) { | |
if(namespace) { |
NewerOlder