Skip to content

Instantly share code, notes, and snippets.

View ImonAwesome's full-sized avatar
✔️
Github Verified!

Md. Imon Hossain ImonAwesome

✔️
Github Verified!
View GitHub Profile
@hellojahid3
hellojahid3 / s3-bucket-downloader.py
Last active June 23, 2025 09:16
Python application provides a feature-rich graphical user interface for downloading files from S3-compatible storage services (AWS S3, DigitalOcean Spaces, etc.). It uses boto3 for S3 operations and Tkinter for the GUI.
#!/usr/bin/env python3
import boto3
import os
import logging
import sys
import threading
import tkinter as tk
from tkinter import ttk, filedialog, messagebox
from typing import Optional
@hellojahid3
hellojahid3 / docker-compose.yml
Last active October 29, 2024 18:20
Redis Database Server with Replica Set and Persistent Storage - Portainer Stack Template
# Set the environment variables from Portainer
#
# REDIS_PASSWORD=some_secure_password
version: "3.9"
services:
redis:
container_name: redis
image: redis/redis-stack:latest
@ipokkel
ipokkel / my-pmpro-redirect-to-referring-page-after-checkout.php
Last active December 12, 2024 07:03 — forked from sc0ttkclark/my-pmpro-redirect-to-referring-page-after-checkout.md
Redirect new members and existing members that changes their existing level back to the referring page after checkout.
<?php
/**
* Updated with https://gist.github.com/ipokkel/fdfeb10a8120777661fbef4e8ed80fa0
* This gist is kept for archival purposes, use the updated one above please.
*/
@ipokkel
ipokkel / unset-and-hide-billing-state-field.php
Last active November 12, 2024 11:52
PMPro - Remove state from required billing fields and hide it the state field.
<?php // Do NOT copy this line
/* Copy from below this line */
/*
Remove state from required billing fields and hide it the state field.
*/
// Unset state
function my_pmpro_required_billing_fields( $fields ) {
#!/usr/bin/env bash
# Enter your license key below
license_key=XXXXXXXXXXXXXXXXX
curl -O -J -L 'https://sendy.co/download/?license=${license_key}'
filename=$(basename -- sendy-*.zip)
newdir="${filename%.*}"
echo ${newdir}
@lukecav
lukecav / functions.php
Created October 15, 2018 23:08
Add multiple products to cart from URL link in WooCommerce
function woocommerce_maybe_add_multiple_products_to_cart() {
// Make sure WC is installed, and add-to-cart qauery arg exists, and contains at least one comma.
if ( ! class_exists( 'WC_Form_Handler' ) || empty( $_REQUEST['add-to-cart'] ) || false === strpos( $_REQUEST['add-to-cart'], ',' ) ) {
return;
}
// Remove WooCommerce's hook, as it's useless (doesn't handle multiple products).
remove_action( 'wp_loaded', array( 'WC_Form_Handler', 'add_to_cart_action' ), 20 );
$product_ids = explode( ',', $_REQUEST['add-to-cart'] );
@amanjuman
amanjuman / Sendy Nginx Config
Last active May 1, 2025 20:40
Sendy Nginx Config for PHP8.1 FPM
sudo su
//Setup Hostname
hostnamectl set-hostname subdomain.domain.tld
## Basic
sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get autoremove -y && sudo apt-get install software-properties-common
//Setup SWAP
sudo fallocate -l 1G /swapfile;
ls -lh /swapfile;
@CrandellWS
CrandellWS / wp_head_hide_billing_fields_for_registered_users.php
Last active November 22, 2023 00:10 — forked from strangerstudios/wp_head_hide_billing_fields.php
Hide Paid Memberships Pro billing address fields and make them optional. Meant to be used with the Braintree gateway.
add_action('pmpro_checkout_before_submit_button', 'my_pmp_jquery');
function my_pmp_jquery() {
global $current_user;
get_currentuserinfo();
if ($current_user->user_login) {
//script will hide billing fields and prefill name and email from WP account
?>
<script>
jQuery( document ).ready(function($) {