Skip to content

Instantly share code, notes, and snippets.

View asifulmamun's full-sized avatar
🏠
Working from home

Al Mamun asifulmamun

🏠
Working from home
View GitHub Profile
@asifulmamun
asifulmamun / ecosystem.confi.js
Created August 14, 2025 12:56
NodeJS ecosystem file for PM2
module.exports = {
apps: [
{
name: 'bazaarbound-backend',
script: 'dist/main.js', // adjust if your entry file is different
watch: ['./dist'],
env: {
NODE_ENV: 'production',
AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE: '1',
},
@asifulmamun
asifulmamun / bazaarbound.com.conf
Created August 14, 2025 12:54
Locally 5000 port on, public port off, proxy server bypass the port, cloudflare free origin certficate, cloudlare full strict mode with dns proxy enabled
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name bazaarbound.com www.bazaarbound.com;
ssl_certificate /etc/ssl/cloudflare/cert.pem;
ssl_certificate_key /etc/ssl/cloudflare/key.pem;
root /var/www/html/bazaarbound-frontend/dist;
index index.php index.html index.htm index.nginx-debian.html;
@asifulmamun
asifulmamun / hit_count.php
Last active August 13, 2025 08:35
hit_count.php - Get Hit data in hit.txt log
<?php
// hit.php - Logging + redirect + pixel image
$logfile = __DIR__ . '/hits.txt';
// $ts_log = gmdate('Y-m-d H:i:s');
$dt = new DateTime('now', new DateTimeZone('Asia/Dhaka'));
$ts_log = $dt->format('Y-m-d H:i:s');
$ip = $_SERVER['REMOTE_ADDR'] ?? '';
$ua = str_replace(["\n", "\r"], ['',''], $_SERVER['HTTP_USER_AGENT'] ?? '');
UPDATE expire_date SET msg_date_1 = 'RXJGbFE5THorYkNtMktoYUVaeXVaZz09', msg_date_2 = 'MVdBa2wyc1NPaDlFdFpsM1h0ZFZrQT09', msg_date_3 = 'UEs3akVjR1lxS3Z5UXcwMjBEY3pGUT09', expire_date = 'OHc2YUV1Tng5ZUN5cGtXdTREZk5WZz09' WHERE expire_date.id = 3
@asifulmamun
asifulmamun / Huffman Coding | Greedy Algorithm | DSA | PHP
Created July 9, 2025 05:42
Huffman Coding | Greedy Algorithm | DSA | PHP
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_FILES['image'])) {
$image = $_FILES['image']['tmp_name'];
$imageData = file_get_contents($image);
$base64 = base64_encode($imageData);
$data = $base64;
}
?>
{
"exportFormatVersion": 2,
"exportTime": "2024-10-23 06:16:01",
"containerVersion": {
"path": "accounts/6250428815/containers/195873904/versions/4",
"accountId": "6250428815",
"containerId": "195873904",
"containerVersionId": "4",
"container": {
"path": "accounts/6250428815/containers/195873904",
@asifulmamun
asifulmamun / WooCommerce WP - minimum weight specify while order.php
Last active September 27, 2024 04:05
WooCommerce WP - minimum weight specify while order
<?php
// WooCommerce WP - minimum weight specify while order
add_action( 'woocommerce_check_cart_items', 'spyr_set_weight_requirements' );
function spyr_set_weight_requirements() {
// Only run in the Cart or Checkout pages
if( is_cart() || is_checkout() ) {
global $woocommerce;
// Set the minimum weight before checking out
$minimum_weight = 2;
@asifulmamun
asifulmamun / console.php
Created August 16, 2023 16:08 — forked from miftahafina/console.php
Remove laravel controller with artisan command
<?php
/**
* Copy and paste the code below into your routes/console.php file.
* You can add more command such as 'remove:model', 'remove:middleware', etc if you want,
* just modify the $file_location variable.
*/
Artisan::command('remove:controller {name : Name of the controller}', function ($name) {
@asifulmamun
asifulmamun / Tonmoy-Assembly-0-10-even-odd-problem.asm
Last active February 25, 2021 13:39
Tonmoy Problem for Question - Assembly - 0-10 even or odd
.DATA
PROMPT_1 DB \'Enter the number from 0 to 10 : $\'
PROMPT_2 DB 0DH,0AH,\'The number is : $\'
.CODE
MAIN PROC
MOV AX, @DATA ; initialize DS
MOV DS, AX
LEA DX, PROMPT_1 ; load and print PROMPT_1