View axios.js
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
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 dont-delete-private-files.php
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 | |
/** Wait until caldera_forms_core_init hook so we know all actions were added **/ | |
add_action( 'caldera_forms_core_init', function() { | |
//File delete is attempted first here, but if an email should send, the file isn't deleted// | |
remove_action( 'caldera_forms_submit_complete', array( 'Caldera_Forms_Files', 'cleanup' ) ); | |
//If email is set to be used, we wait until email is sent to delete on these hooks: | |
remove_action( 'caldera_forms_mailer_complete', array( 'Caldera_Forms_Files', 'delete_after_mail' ), 10, 3 ); | |
remove_action( 'caldera_forms_mailer_failed', array( 'Caldera_Forms_Files', 'delete_after_mail' ), 10, 3 ); | |
View laravel-slug.php
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 | |
namespace App\Services; | |
class Slug | |
{ | |
private $entity; | |
private $slugAttr; | |
public function __construct($entity = \App\Post::class, $slugAttr = 'slug') |