Skip to content

Instantly share code, notes, and snippets.

View shrasel's full-sized avatar

Shahjahan Rasel shrasel

View GitHub Profile
@shrasel
shrasel / jenv-maven-auto-switcher.sh
Created January 2, 2026 17:56
Bash script that integrates with jEnv to automatically switch between Maven 3.8 (for Java 8) and Maven 3.9+ (for Java 11+) by dynamically modifying the PATH variable based on the active local Java version.
#!/bin/bash
# ~/jenv-maven-auto-switcher.sh
# -----------------------------------------------------------------------------
# Configuration
# Update the path based on your mavel location
# -----------------------------------------------------------------------------
: "${MAVEN_388:=$HOME/Development/maven-versions/apache-maven-3.8.8/bin}"
: "${MAVEN_LATEST:=$HOME/Development/maven-versions/apache-maven-3.9.11/bin}"
@shrasel
shrasel / .dockerignore
Created December 6, 2025 07:37
Optimized Node.js .dockerignore template
# Dependency directories
node_modules
npm-debug.log
# Git & Local Configs
.git
.gitignore
.dockerignore
Dockerfile
version: '3.1'
services:
zookeeper:
image: wurstmeister/zookeeper
container_name: zookeeper
ports:
- "2181:2181"
kafka:
image: wurstmeister/kafka
container_name: kafka
@shrasel
shrasel / docker-compose-mysql8.yml
Created August 16, 2023 04:01
MySql 8 for MacBook M1
version: "3.8"
services:
mysql:
image: mysql:8
platform: linux/arm64 # Specify the architecture for M1
container_name: mysql8
environment:
MYSQL_ROOT_PASSWORD: 123456
ports:
- "3306:3306"
@shrasel
shrasel / docker-compose-kafka.yml
Last active August 16, 2023 04:02
Kafka Docker Compose for Local in MAC
version: "3.8"
services:
zookeeper:
image: bitnami/zookeeper:latest
container_name: zookeeper
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
@shrasel
shrasel / docker-compose-mongodb.yaml
Last active August 16, 2023 04:03
This docker compose file is to create the mongodb container
version: "3.8"
services:
mongodb:
image: mongo
container_name: mongodb
ports:
- 27017:27017
volumes:
- data:/data
environment:
@shrasel
shrasel / gist:c6ef164e308c32884286bbe894898512
Created October 23, 2019 12:00
How to remove Laravel 5.5 vendor from the project
Steps to remove a package from Laravel are:
1. Remove declaration from composer.json
2. Remove Service Provider from "app/config/app.php"
3. Remove any Class Aliases from "app/config/app.php"
4. Remove any references to the package from your code.
5. Run "composer update vendor/packagename". This will remove the package folder from "vendor" folder and will rebuild composer autoloading map
it will remove the package folder from "Vendor" folder
@shrasel
shrasel / Rabbitmq.php
Created March 17, 2019 04:13
RabbitMQ Library for CI
<?php defined('BASEPATH') OR exit('No direct script access allowed');
use PhpAmqpLib\Channel\AMQPChannel;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Exception\AMQPIOException;
use PhpAmqpLib\Message\AMQPMessage;
/**
* CodeIgniter RabbitMQ Library
* @category Libraries