Skip to content

Instantly share code, notes, and snippets.

View akshuvo's full-sized avatar

Akhtarujjaman Shuvo akshuvo

View GitHub Profile
@akshuvo
akshuvo / country currency html option select field.html
Created December 8, 2019 10:20
country currency html option select field
<select id="currency_iso_code" name="currency[iso_code]" class="custom-select">
<option value="AFN">afghani afghan (AFN)</option>
<option value="XAG">argent (XAG)</option>
<option value="MGA">ariary malgache (MGA)</option>
<option value="THB">baht thaïlandais (THB)</option>
<option value="PAB">balboa panaméen (PAB)</option>
<option value="ETB">birr éthiopien (ETB)</option>
<option value="VEF">bolivar vénézuélien (VEF)</option>
<option value="BOB">boliviano bolivien (BOB)</option>
<option value="CRC">colón costaricain (CRC)</option>
@akshuvo
akshuvo / prestashop-var_dump.tpl
Created November 24, 2019 08:14
Prestashop var_dump and print
Method 1 (won't work in Smarty 3.1 or later):
{php}
$var =
$this->get_template_vars('var');
var_dump($var);
{/php}
Method 2:
@akshuvo
akshuvo / upload-a-file.MD
Created November 19, 2019 17:15 — forked from ahmadawais/upload-a-file.MD
Upload a file using the WordPress REST API

Upload files

Using the REST API to upload a file to WordPress is quite simple. All you need is to send the file in a POST-Request to the wp/v2/media route.

There are two ways of sending a file. The first method simply sends the file in the body of the request. The following PHP script shows the basic principle:

@akshuvo
akshuvo / functions.php
Created September 29, 2019 18:10 — forked from yojance/functions.php
Removing a Product From The Cart Programatically In WooCommerce
<?php
add_action( 'template_redirect', 'remove_product_from_cart' );
function remove_product_from_cart() {
// Run only in the Cart or Checkout Page
if( is_cart() || is_checkout() ) {
// Set the product ID to remove
$prod_to_remove = 56;
// Cycle through each product in the cart
foreach( WC()->cart->cart_contents as $prod_in_cart ) {
@akshuvo
akshuvo / media-query.css
Created September 26, 2019 04:46 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@akshuvo
akshuvo / parallax-scroll.js
Created September 22, 2019 10:34 — forked from omgmog/parallax-scroll.js
Simple parallax background scrolling with jQuery
$(function() {
var $el = $('.parallax-background');
$(window).on('scroll', function () {
var scroll = $(document).scrollTop();
$el.css({
'background-position':'50% '+(-.4*scroll)+'px'
});
});
});

To install macOS High Sierra 10.13.5 on a virtual machine using VMware:

  1. If you have not installed VMware Workstation on a Windows operating system before, please refer to the following video.

https://www.youtube.com/watch?v=-Uf9-6SPiMY

  1. After installing VMware Workstation, you need the VMware Unlocker program to create a new virtual machine for the MacOS High Sierra 10.13.5 installation. To download the VMware Unlocker program to your computer, visit the link below.

Article ➦ https://www.sysnettechsolutions.com/en/vmware/download-vmware-unlocker-2-1-1/

@akshuvo
akshuvo / regular_expression_cheatsheet.md
Created September 3, 2019 04:57 — forked from jonlabelle/regular_expression_cheatsheet.md
Regular Expression Cheatsheet

Regular Expression Cheatsheet

Anchors

^   Matches at the start of string or start of line if multi-line mode is
	enabled. Many regex implementations have multi-line mode enabled by
	default.

$ Matches at the end of string or end of line if multi-line mode is enabled.
@akshuvo
akshuvo / custom-css.php
Created August 4, 2019 18:23 — forked from iqbalrony/custom-css.php
How to add custom css field with elementor free version.
<?php
use Elementor\Controls_Manager;
use Elementor\Element_Base;
use Elementor\Core\Files\CSS\Post;
use Elementor\Core\DynamicTags\Dynamic_CSS;
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
// Extend jQuery addClass function to accept callback function
var oAddClass = $.fn.addClass;
$.fn.addClass = function () {
for (var i in arguments) {
var arg = arguments[i];
if ( !! (arg && arg.constructor && arg.call && arg.apply)) {
arg();
delete arg;
}
}