Skip to content

Instantly share code, notes, and snippets.

View PrafullaKumarSahu's full-sized avatar

Prafulla Kuamr Sahu PrafullaKumarSahu

View GitHub Profile
<?php
/** Bootstrap WordPress */
include('./wp-load.php');
/**
* Generate some random data
*/
$data = array();
$iterations = 10;
<?php
/**
* Plugin Name:
* Plugin Author:
* Plugin URI:
*/
require_once realpath(dirname(__FILE__).'/google-api-php-client/src/Google/autoload.php');
session_start();
<?php
/**
* Plugin Name:
* Plugin Author:
* Plugin URI:
*/
require_once realpath(dirname(__FILE__) . '/google-api-php-client/src/Google/autoload.php');
session_start();
global $analytica_db_version;
<?php
/**
* Plugin Name:
* Plugin Author:
* Plugin URI:
*/
require_once realpath(dirname(__FILE__) . '/google-api-php-client/src/Google/autoload.php');
session_start();
global $analytica_db_version;
<?php
/**
* Plugin Name: Blank Test Plugin
* Author: Prafulla kumar Sahu
*
*/
?>
@PrafullaKumarSahu
PrafullaKumarSahu / gist:c522c263389678f5ff27d1dfd368cb05
Created November 25, 2016 06:20
How to remove action hooking non static method and class can not be instantiated
//http://stackoverflow.com/questions/40788732/how-to-remove-action-hooking-non-static-method-and-class-can-not-be-instantiated/40790864#40790864
/**
* Do a hard unregister of an object's callback for the specified event name
* and priority level.
*
* In WordPress, the callback key (or unique ID) is generated using the hash ID of
* the object concatenated with the method name. In the event that you do not have
* the object itself, then we use this hard approach to first first the callback
@PrafullaKumarSahu
PrafullaKumarSahu / bp-profile-tab-and-subnav.php
Created July 12, 2017 08:31 — forked from shanebp/bp-profile-tab-and-subnav.php
BuddyPress add profile tab and subnav
function add_animal_tabs() {
global $bp;
bp_core_new_nav_item( array(
'name' => 'Animals',
'slug' => 'animals',
'parent_url' => $bp->displayed_user->domain,
'parent_slug' => $bp->profile->slug,
'screen_function' => 'animals_screen',
'position' => 200,
<?php
/*
* jQuery File Upload Plugin PHP Class
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* https://opensource.org/licenses/MIT
Prafullas-MacBook-Air:packerZero prafullakumarsahu$ packer
-bash: packer: command not found
Prafullas-MacBook-Air:packerZero prafullakumarsahu$ composer require bitfumes/laravel-packer --prefer-dist
^C
Prafullas-MacBook-Air:packerZero prafullakumarsahu$ composer require bitfumes/laravel-packer --prefer-dist
Content-Length mismatch, received 709535 bytes out of the expected 2264473
http://repo.packagist.org could not be fully loaded, package information was loaded from the local cache and may be out of date
Using version ^1.4 for bitfumes/laravel-packer
./composer.json has been updated
Loading composer repositories with package information