Skip to content

Instantly share code, notes, and snippets.

View dushmanta05's full-sized avatar
:octocat:
Building

Dushmanta dushmanta05

:octocat:
Building
View GitHub Profile
@dushmanta05
dushmanta05 / command.sh
Created March 12, 2025 00:22
Change Git author name and email in exisitng project
git filter-branch --env-filter '
if [ "$GIT_COMMITTER_EMAIL" = "old-email" ]; then
export GIT_COMMITTER_NAME="new-name"
export GIT_COMMITTER_EMAIL="new-email"
fi
if [ "$GIT_AUTHOR_EMAIL" = "old-email" ]; then
export GIT_AUTHOR_NAME="new-name"
export GIT_AUTHOR_EMAIL="new-email"
fi
' --tag-name-filter cat -- --branches --tags
@dushmanta05
dushmanta05 / docker-compose.yml
Created January 28, 2025 10:13
mongodb 4.4.1 docker
version: '3.8'
services:
mongodb:
image: mongo:4.4.1
container_name: mongodb
restart: unless-stopped
ports:
- "27018:27017"
volumes:
{
"version": "2.0.0",
"tasks": [
{
"label": "compile",
"type": "shell",
"command": "g++",
"args": ["-std=c++17", "-o", "demo", "demo.cpp"],
"group": {
"kind": "build",
@dushmanta05
dushmanta05 / rename-script.sh
Last active April 2, 2025 02:29
Rename bulk files using bash with a matched pattern
#!/bin/bash
# Array of patterns to be removed
patterns=("-" "IMG" "_" "~" "~4" "WA" "Bokeh" "(2)" "(1)" "Snapchat" "VID")
new_pattern=""
# Get the directory where files needs to be renamed
current_dir="./photos"
# Counter for renamed files
@dushmanta05
dushmanta05 / upgrade-git.sh
Last active June 10, 2024 01:30
Update Git version to latest (Ubuntu)
sudo add-apt-repository ppa:git-core/ppa
sudo apt update
sudo apt upgrade git
@dushmanta05
dushmanta05 / OrphanPayments.php
Last active March 12, 2024 06:08
Orphan Payment Link
<?php
// Import code
public function table(Table $table): Table
{
$paymentWizard = new PaymentWizardHelper();
return $table
->query(