Skip to content

Instantly share code, notes, and snippets.

View zakirsajib's full-sized avatar
💭
Looking for a new challenge in 2022!

Zakir Sajib zakirsajib

💭
Looking for a new challenge in 2022!
View GitHub Profile
@zakirsajib
zakirsajib / index.html
Last active April 23, 2022 13:12
Horizontal Scrolling
<ul>
<li>A</li>
<li>B</li>
<li>C</li>
<li>D</li>
<li>E</li>
<li>F</li>
<li>G</li>
<li>H</li>
<li>I</li>
@zakirsajib
zakirsajib / gist:8cbe37e2bd73696db51c4b1fb9846d5d
Last active April 21, 2022 11:56
Glass box shadow, transition
.box {
background-color: #f0f8ff;
box-shadow: 0px 25px 35px -25px #97a3b8;
transition: all 0.3s ease-in;
}
.box:hover {
background-color: #f0ffff;
box-shadow: 0px 0px 0px 0px rgb(136 0 64 / 49%);
transform: translateY(-1px);
@zakirsajib
zakirsajib / redirectdomain.md
Last active April 20, 2022 09:09
Redirect one domain to another domain in cloudflare

First both domains must be within cloudflare. Both domains Nameservers must be changed to cloudflare's nameservers.

  1. Then login to first domain cludflare DNS dashboard. Lets say our first domain is hublearn.dk

  2. click Add Record

  3. Select Type A, In Name field, enter: hublearn.dk and in IPV4 address, add: 192.0.2.1. Save.

  4. Again Click Add Record

  5. Select Type A, In Name field, enter: www and in IPv4 address, type: 192.0.2.1. Save.

  6. Make sure both field has proxy status: Proxied and TTL auto set.

  7. Now go to Page Rules tab.

@zakirsajib
zakirsajib / gist:6ea77f7877ed293e6fe9aed905e05233
Created April 20, 2022 08:30
Adding vendor signup option in checkout page (Dokan multivendor, WooCommerce)
/*
* Adding vendor signup option in checkout page (Dokan multivendor, WooCommerce).
* In checkout page, we are providing custom fields, so if a customer interested to become a vendor, they must fill out his
* store name and store url.
*
* These 2 fields will be saved into User's database and integrated to Dokan framework.
*/
add_action('woocommerce_after_checkout_billing_form', 'fluf_vendor_registration_checkout');
@zakirsajib
zakirsajib / gist:3bd4602406df988ce621790e7f7b5cc1
Created April 17, 2022 10:11
where-do-i-store-an-api-key-in-wordpress
https://travis.media/where-do-i-store-an-api-key-in-wordpress/
@zakirsajib
zakirsajib / button.css
Last active January 12, 2022 07:09
CTA Button Example
.cta-button {
max-width: 333px;
width: 100%;
position: relative;
}
.cta-button .ss-button {
border-top-left-radius: 30px;
border-bottom-right-radius: 30px;
width: 273px;
height: 63px;
Watch this video to get an idea:
https://www.awesomescreenshot.com/video/6744897?key=4a6ccb3089afc5ab720dd38fcb9dc8c1
We will build this:
https://woocommerce-427276-1719000.cloudwaysapps.com/wp-content/uploads/2022/01/googlemap.png
@zakirsajib
zakirsajib / gist:ef900112ba7e32ac34bd70fc69d22d5e
Last active January 7, 2022 14:44
add legal texts before order review and payment boxes in checkout page. and bring the terms and conditions checkbox below the legal notes.
## Requirement:
add legal texts before order review and payment boxes in checkout page. and bring the terms and conditions checkbox below the legal notes.
## solution:
i think we can put the legal notes below the coupon boxes. because coupon box only appears before order and payment page/section. other sections are billing and shipping and login. we don't want to show the legal notes there. so our focus would be only in 4th stage ( order & payment info ) of the checkout page.
there is no hook to place anything below coupon. there are hooks to place before or after payment box, submit button etc.
so i think overriding the form-coupon.php file would be the right way to do. we can place our legal copy below the contents of this file. after test, we can see yes its showing below the coupon boxes.
@zakirsajib
zakirsajib / gist:6675b3bb3c702e5f040aff3b5fa3da23
Created June 24, 2020 13:24
Multi Vendor Theme for WooCommerce
https://yithemes.com/themes/plugins/yith-woocommerce-multi-vendor/
Check their admin dashboard.
http://demo.wpthemego.com/themes/sw_shopymall/
https://preview.themeforest.net/item/electro-electronics-store-woocommerce-theme/full_screen_preview/15720624?_ga=2.233221533.228043824.1593003774-282314435.1593003038
@zakirsajib
zakirsajib / gist:55f1dd18d6fe0147806f2b1e78e35b9d
Last active June 23, 2020 04:11
Imagine a scenario where the application you have built is regularly causing MySQL CPU usage to spike to 100% and memory exhaustion in production. Describe what you would do to isolate the cause of the problem and fix it.
# Imagine a scenario where the application you have built is regularly causing MySQL CPU
usage to spike to 100% and memory exhaustion in production. Describe what you would
do to isolate the cause of the problem and fix it.
# Answer
## Isolate the cause of the problem
## Fix