Skip to content

Instantly share code, notes, and snippets.

Avatar

Julian Paolo Dayag WisdomSky

View GitHub Profile
@WisdomSky
WisdomSky / automatic-component-registration.js
Created Aug 31, 2020
Automatically registers all(except App.vue) vue components inside the components directory
View automatic-component-registration.js
const components_req = require.context('./components', true, /^(.*\.(vue))[^.]*$/im);
const components = components_req.keys().reduce(function(acc, key){
const name = key.replace(/^.*\/([^\.]+)\.vue/,'$1');
if (name !== 'App') {
let comp = components_req(key);
acc[name] = comp.default && comp.__esModule ? comp.default : comp;
}
return acc;
}, {});
@WisdomSky
WisdomSky / README.md
Last active Apr 10, 2020
facebook automate unblock all members from group.
View README.md
@WisdomSky
WisdomSky / README.md
Last active Jan 27, 2022
Signal Server Installation v1.88 Full Guide
View README.md

# Requirements

  • Java 11
  • Maven
  • Redis
  • PostgreSQL
@WisdomSky
WisdomSky / wp_get_nav_menu_items_hierarchy
Created Apr 20, 2015
Sorts the results returned by Wordpress' wp_get_nav_menu_items() function into a hierarchichal multi-dimensional array.
View wp_get_nav_menu_items_hierarchy
/*
* you can use this function just like the way you use wp_get_nav_menu_items() in wordpress
*
*/
function wp_get_nav_menu_items_hierarchy($menu,$args=null){
$arr = array();
function _inject_child($id,$item,&$list){