Skip to content

Instantly share code, notes, and snippets.

View niamrox's full-sized avatar

Niamul Hasan niamrox

View GitHub Profile
@niamrox
niamrox / cl_log.md
Last active December 17, 2020 11:08
Closing Log readme sample file

21-11-2020 Saturday

  1. Checked on Project Status and guide
  2. RnD for help-desk (Knowledge Base) & FAQ
  3. Preparing Backend for Knowledge Base & FAQ
  4. Fix Header
  5. Dynamic Header Menus
  6. Dynamic footer with widgets.
  7. Seller UI/UX (CD)
@niamrox
niamrox / WordPress.xml
Created April 2, 2020 19:54
WordPress Live Template For PhpStrom
<templateSet group="WordPress">
<template name="act" value="add_action( '$HOOK$', array( $this, '$FUNCTION$' ) );&#10;$END$" description="add_action OOP WordPress" toReformat="true" toShortenFQNames="true">
<variable name="HOOK" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="FUNCTION" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
</template>
<template name="actp" value="add_action( '$HOOK$', array( $this, '$FUNCTION$' ) );&#10;$END$" description="add_action procedural WordPress" toReformat="true" toShortenFQNames="true">
<variable name="HOOK" expression="" defaultValue="" alwaysStopAt="true" />
@niamrox
niamrox / gist:dfc6eb6f5656f3592635e9d0c9554025
Created December 17, 2019 05:36
Create Wordpress Admin SQL Command
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`,
`user_status`)
VALUES ('admin999', MD5('password999'), 'firstname lastname', '[email protected]', '0');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users),
'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}');
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`)
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10');
@niamrox
niamrox / abstract.php
Created February 2, 2019 07:43 — forked from zanematthew/abstract.php
The abstract class for creating Custom Post Types
<?php
/**
*
* This is used to regsiter a custom post type, custom taxonomy and provide template redirecting.
*
* This abstract class defines some base functions for using Custom Post Types. You should not have to
* edit this abstract, only add additional methods if need be. You must use what is provided for you
* in the interface.
*
*/
@niamrox
niamrox / meta-tags.md
Created May 22, 2018 22:34 — forked from lancejpollard/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta name="keywords" content="your, tags"/>
<meta name="description" content="150 words"/>
<meta name="subject" content="your website's subject">
<meta name="copyright"content="company name">
<meta name="language" content="ES">
@niamrox
niamrox / Python3 Virtualenv Setup.md
Created April 24, 2018 08:39 — forked from pandafulmanda/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@niamrox
niamrox / gist:6e39ff40558d371b3e8bf8e6f9ce240d
Created October 23, 2017 17:56 — forked from jchamb/gist:fdf7d12b0191cb852056
Woocommerce Free Downloads without checkout
function direct_free_downloads_button($button)
{
global $product;
if( $product->is_downloadable() AND $product->get_price() == 0 )
{
$files = $product->get_files();
$files = array_keys($files);
$download_url = home_url('?download_file='.$product->id.'&key='.$files[0].'&free=1' );
@niamrox
niamrox / supposition.js
Created August 27, 2017 07:24 — forked from joeldbirch/supposition.js
Updated version of Supposition. This version is compatible with Superfish 1.6+. See this ancient page for description, example and caveats: http://users.tpg.com.au/j_birch/plugins/superfish/supposition-test/
/*
* Supposition v0.3a - an optional enhancer for Superfish jQuery menu widget
*
* Copyright (c) 2013 Joel Birch - based on work by Jesse Klaasse - credit goes largely to him.
* Special thanks to Karl Swedberg for valuable input.
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*/
initApplyImageLoad: function () {
var $container = $('.site-content');
var $status = $('#status');
var $progress = $('progress');
var supportsProgress = $progress[0] &&
// IE does not support progress
$progress[0].toString().indexOf('Unknown') === -1;
var loadedImageCount, imageCount;
@niamrox
niamrox / gist:32a869041e306f8ef86f5ebbadbbc1f0
Created July 30, 2017 15:33 — forked from mikejolley/gist:1860056
WooCommerce - Override billing fields
add_filter( 'woocommerce_billing_fields', 'custom_woocommerce_billing_fields' );
function custom_woocommerce_billing_fields( $fields ) {
// Over-ride a single label
$fields['billing_first_name']['label'] = 'Your label';
// Over-ride a single required value
$fields['billing_first_name']['required'] = false;