Skip to content

Instantly share code, notes, and snippets.

View manidip's full-sized avatar

Manidip Mandal manidip

  • AurionPro
  • Delhi
View GitHub Profile
@manidip
manidip / remove_checkout_fields.php
Created November 14, 2023 04:05 — forked from cryptexvinci/remove_checkout_fields.php
Remove fields from WooCommerce checkout page.
<?php
add_filter( 'woocommerce_checkout_fields' , 'custom_remove_woo_checkout_fields' );
function custom_remove_woo_checkout_fields( $fields ) {
// remove billing fields
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_last_name']);
unset($fields['billing']['billing_company']);
@manidip
manidip / wordpress-upload-base64.php
Created July 11, 2023 10:01 — forked from cyberwani/wordpress-upload-base64.php
Upload a base64 string as image to the WordPress media library
<?php
/**
* Save the image on the server.
*/
function save_image( $base64_img, $title ) {
// Upload dir.
$upload_dir = wp_upload_dir();
$upload_path = str_replace( '/', DIRECTORY_SEPARATOR, $upload_dir['path'] ) . DIRECTORY_SEPARATOR;
@manidip
manidip / package.json
Created May 15, 2023 09:34 — forked from adrianhajdin/package.json
Client Side package.json
{
"name": "mern-stack-client",
"version": "0.1.0",
"private": true,
"proxy": "https://memories-project-part4.herokuapp.com/",
"dependencies": {
"@material-ui/core": "^4.9.10",
"@material-ui/icons": "^4.9.1",
"@material-ui/lab": "^4.0.0-alpha.58",
"@testing-library/jest-dom": "^4.2.4",
@manidip
manidip / app styles
Created May 15, 2023 09:34 — forked from adrianhajdin/app styles
Memories Initial Styles
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles(() => ({
appBar: {
borderRadius: 15,
margin: '30px 0',
display: 'flex',
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
@manidip
manidip / HomeStyles.js
Created May 15, 2023 09:34 — forked from adrianhajdin/HomeStyles.js
Memories Part 4 Code
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles((theme) => ({
appBarSearch: {
borderRadius: 4,
marginBottom: '1rem',
display: 'flex',
padding: '16px',
},
pagination: {
@manidip
manidip / AuthStyles.js
Created May 15, 2023 09:33 — forked from adrianhajdin/AuthStyles.js
MERN Auth Materials
import { makeStyles } from '@material-ui/core/styles';
export default makeStyles((theme) => ({
paper: {
marginTop: theme.spacing(8),
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
padding: theme.spacing(2),
},
@manidip
manidip / functions.php
Created April 25, 2023 08:30 — forked from maddisondesigns/functions.php
WooCommerce Custom Fields for Simple & Variable Products
/*
* Add our Custom Fields to simple products
*/
function mytheme_woo_add_custom_fields() {
global $woocommerce, $post;
echo '<div class="options_group">';
// Text Field
@manidip
manidip / debug-http-request.php
Created March 24, 2022 11:32 — forked from maheshwaghmare/debug-http-request.php
Debug the HTTP requests in WordPress wp_remote_post() or wp_remote_get() with the help of `http_api_debug` hook.
<?php
/**
* Debug HTTP requests in WordPress
*
* Fires after an HTTP API response is received and before the response is returned.
*
* Output in `wp-content\debug.log` file:
*
* [24-Apr-2019 06:50:16 UTC] ------------------------------
* [24-Apr-2019 06:50:16 UTC] https://downloads.wordpress.org/plugin/elementor.2.5.14.zip
namespace: "flex-", //{NEW} String: Prefix string attached to the class of every element generated by the plugin
selector: ".slides > li", //{NEW} Selector: Must match a simple pattern. '{container} > {slide}' -- Ignore pattern at your own peril
animation: "fade", //String: Select your animation type, "fade" or "slide"
easing: "swing", //{NEW} String: Determines the easing method used in jQuery transitions. jQuery easing plugin is supported!
direction: "horizontal", //String: Select the sliding direction, "horizontal" or "vertical"
reverse: false, //{NEW} Boolean: Reverse the animation direction
animationLoop: true, //Boolean: Should the animation loop? If false, directionNav will received "disable" classes at either end
smoothHeight: false, //{NEW} Boolean: Allow height of the slider to animate smoothly in horizontal mode
startAt: 0, //Integer: The slide that the slider should start on. Array nota
@manidip
manidip / SSLXampp.md
Created March 8, 2021 08:35 — forked from nguyenanhtu/SSLXampp.md
Guide to configure SSL in XAMPP for Windows

How to test 'https' in XAMPP for localhost ? I will guide you

Menu

  • Create certificate
  • Config Apache to access https instead of http
  • Config mod rewrite to generate SSL url
  • Config Virtual host to test site

Step 1 : Create certificate

  • Go to your XAMPP installation directory (in my case it’s E:\xampp), figure out apache folder. In this, find & run batch file