Skip to content

Instantly share code, notes, and snippets.

View ishaadX's full-sized avatar
🎯
Focusing

ishtiaque-shaad ishaadX

🎯
Focusing
View GitHub Profile
@ishaadX
ishaadX / block.js
Created November 25, 2019 10:50 — forked from mattheu/block.js
Gutenberg - Test case custom block for passing content to render callback
const el = wp.element.createElement,
registerBlockType = wp.blocks.registerBlockType,
InnerBlocks = wp.blocks.InnerBlocks;
registerBlockType( 'gutenberg-boilerplate-es5/hello-world-step-01', {
title: 'Hello World (Step 1)',
icon: 'universal-access-alt',
category: 'layout',
@ishaadX
ishaadX / delete_git_submodule.md
Created January 6, 2019 12:34 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@ishaadX
ishaadX / class-tgm-plugin-activation.php
Created September 26, 2017 09:59 — forked from al5dy/class-tgm-plugin-activation.php
TGM 'Warning: sprintf(): Too few arguments...' bugfix
/**
* Sets install skin strings for each individual plugin.
*
* Checks to see if the automatic activation flag is set and uses the
* the proper strings accordingly.
*
* @since 2.2.0
*/
public function add_strings() {
if ( 'update' === $this->options['install_type'] ) {
@ishaadX
ishaadX / nav-menu-exporter-importer.php
Created May 27, 2017 11:34 — forked from hissy/nav-menu-exporter-importer.php
[WordPress Plugin] Nav Menu Exporter and Importer / Export and Import nav menus. Requires WordPress Importer plugin.
<?php
/*
Plugin Name: Nav Menu Exporter and Importer
Description: Export and Import nav menus. Requires WordPress Importer plugin
Author: hissy, megumi themes
Version: 0.1
Text Domain: nav-menu-exporter-importer
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@ishaadX
ishaadX / Install Composer to use MAMP's PHP.md
Created June 13, 2016 06:58 — forked from kkirsche/Install Composer to use MAMP's PHP.md
How to install Composer globally using MAMP's PHP

##Create an alias to MAMP's PHP installation

To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well.

Within the terminal, run:

nano ~/.bash_profile

This will open nano with the contents, at the top in a blank line add the following line:

`class Custom_Pages_Widgets extends WP_Widget{
public function __construct(){
$widget_ops = array(
'description' => __( "A list of your site’s Pages." )
);
parent::__construct( 'custom_widget_pages', __( 'Widget Pages' ), $widget_ops );
}
public function widget( $args, $instance ){
extract($args);
$select = empty( $instance['select'] ) ? '' : $instance['select'];
{
"bold_folder_labels": true,
"caret_extra_bottom": 2,
"caret_extra_top": 2,
"caret_extra_width": 3,
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/Oceanic Next (SL).tmTheme",
"font_size": 14,
"tab_size": 2,
"highlight_line": true,
@ishaadX
ishaadX / Breadcrumb
Last active June 7, 2016 05:12
Simple & Customize Breadcrumb for wordpress from WooCommerce for general purpose...
*********Create a new File name class-breadcrumb.php and paste this code.....*********
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Turbowp_Breadcrumb {
private $crumbs = array();
@ishaadX
ishaadX / WooCommerce Add to cart without login
Last active January 1, 2019 06:59
Woocommerce Product add to cart while logged out
Copy and paste this code on functions.php file in wordpress theme....
add_action( 'woocommerce_add_to_cart' , 'repair_woocommerce_session_add_to_cart');
function repair_woocommerce_session_add_to_cart( ){
if ( defined( 'DOING_AJAX' ) ) {
wc_setcookie( 'woocommerce_items_in_cart', 1 );
do_action( 'woocommerce_set_cart_cookies', true );
}
}