Skip to content

Instantly share code, notes, and snippets.

View wpninj's full-sized avatar

wpninj

  • Intelligent Web Solutions
View GitHub Profile
@wpninj
wpninj / functions.php
Created October 18, 2020 08:36
Adava theme remove required plugin activation notice
<?php
/* remove avada required plugin activation notice */
add_action( 'init', 'op_avada_child_init', 11 );
function op_avada_child_init() {
remove_action( 'admin_notices', array( Avada_TGM_Plugin_Activation::$instance, 'notices' ) );
}
var defaultSides = 10;
var stats = Array.apply(null, { length: defaultSides }).map(
function() {
return 100;
}
);
@wpninj
wpninj / gist:5b7e384f38c7551c31dc96043282c80b
Created October 13, 2020 15:22
Javascript Filter Object's keys
let points = {a: -1, b: -1, c: -1, d: -1, e: -1, f: 3, z:4}
Object.keys(points).filter(key => ~'abcde'.indexOf(key))