Skip to content

Instantly share code, notes, and snippets.

View mdmoinulhossain's full-sized avatar
💻
Coding

MOHAMMAD MOINUL HOSSAIN mdmoinulhossain

💻
Coding
View GitHub Profile
/**
* Change a currency symbol
*/
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2);
function change_existing_currency_symbol( $currency_symbol, $currency ) {
switch( $currency ) {
case 'AUD': $currency_symbol = 'AUD$'; break;
}
return $currency_symbol;
@mdmoinulhossain
mdmoinulhossain / dragColumn6.html
Created December 17, 2023 18:03 — forked from gujc71/dragColumn6.html
Drag and Drop Table Columns
<!DOCTYPE html>
<html>
<head>
<title>Drag and Drop Table Columns</title>
<style>
table {
font-size: 11px;
border-collapse:collapse;
border:1px solid
}
@mdmoinulhossain
mdmoinulhossain / readme.md
Created November 3, 2023 06:05
npm create-react-app error

============================================================================================ #Problem:

Creating a new React app in D:\assignment\Anchorblock-assignment\users-stack.

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts with cra-template...

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! errno ERR_SOCKET_TIMEOUT
@mdmoinulhossain
mdmoinulhossain / style.css
Created January 24, 2023 04:26
Makes shadow / Reduce opacity of background Image
box-shadow: inset 0 0 0 1000px rgba(255, 255, 255, 0.7);
@mdmoinulhossain
mdmoinulhossain / readme.md
Created January 6, 2023 19:07
npm WARN config global --global, --local are deprecated. Use --location=global instead.

As for the actual warning, open Powershell on as an administrator and type the following commands:

$ Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force

$ npm install --global --production npm-windows-upgrade

$ npm-windows-upgrade --npm-version latest

@mdmoinulhossain
mdmoinulhossain / .htaccess
Created December 26, 2022 11:07
Redirect any website HTTP to HTTPS
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ https://%1%{REQUEST_URI} [R=301,L]
</IfModule>
@mdmoinulhossain
mdmoinulhossain / pm2.md
Created December 13, 2022 05:33
pm2 server installation

$ npm install -g pm2

$ pm2 list

$ pm2 start server.js --name "project name"

$ pm2 start/stop 0(id no.)

$ pm2 delete (id no.) -> to delete.

@mdmoinulhossain
mdmoinulhossain / Components.txt
Last active April 1, 2023 09:18
Html Components using JavaScript
class ComponentName extends HTMLElement {
connectedCallback() {
this.innerHTML = `Here your HTML`;
}
}
customElements.define("comp-imple", ComponentName);
// <comp-imple></comp-imple> - into where it shown with script tag link-up. compomrmt name should have small letters
@mdmoinulhossain
mdmoinulhossain / delete_git_submodule.md
Created December 5, 2022 05:57 — 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