Skip to content

Instantly share code, notes, and snippets.

View AHS12's full-sized avatar
🌎
Working in a hybrid schedule

Azizul Hakim AHS12

🌎
Working in a hybrid schedule
View GitHub Profile
@AHS12
AHS12 / github-multi-account.md
Last active March 16, 2026 05:35
github multiple profile switch in same device

Git Profile Switcher Guide

Overview

This guide explains how to manage multiple Git identities (for example work and personal) using a simple bash script. The approach uses:

  • Different Git global user configurations
  • Different SSH identities
  • A small script to switch profiles
@AHS12
AHS12 / the-outbox-pattern.md
Created May 23, 2025 19:55
The Outbox Pattern

Outbox Pattern: Technical Deep Dive

Abstract

The Outbox Pattern is a distributed systems design pattern that ensures atomicity between database transactions and event publishing through transactional outbox semantics. It addresses the fundamental challenge of maintaining consistency across heterogeneous data stores while providing guaranteed event delivery in event-driven architectures.

Problem Domain

The Dual-Write Problem

@AHS12
AHS12 / how to create a Laravel package.md
Last active February 7, 2026 15:04
How to create a Laravel Package
13:44:41.537 [I] usvfs dll 0.5.5.1 initialized in process 18800
13:44:41.537 [D] remove from process 18800
13:44:41.537 [I] create config in 18800
13:44:41.537 [I] 0 processes
13:44:41.538 [I] mod_organizer_instance_1 created in process 18800
13:44:41.538 [I] attached to mod_organizer_instance_1 with 1 nodes, size 4,194,304 B
13:44:41.538 [I] inv_mod_organizer_instance_1 created in process 18800
13:44:41.538 [I] attached to inv_mod_organizer_instance_1 with 1 nodes, size 131,072 B
13:44:41.538 [D] context current shm: mod_organizer_instance (now 2 connections)
13:44:41.538 [D] clearing blacklist
[2024-04-18 07:44:41.394 D] command line: '"K:\Software\MO2\ModOrganizer.exe" '
[2024-04-18 07:44:41.394 I] starting Mod Organizer version 2.5.0 revision 22714e5c in K:/Software/MO2, usvfs: 0.5.5.1
[2024-04-18 07:44:41.394 I] data path: C:/Users/USERNAME/AppData/Local/ModOrganizer/Fallout 4
[2024-04-18 07:44:41.394 I] working directory: K:/Software/MO2
[2024-04-18 07:44:41.394 D] timing: MOApplication setup() 0 ms
[2024-04-18 07:44:41.481 D] using ini at 'C:/Users/USERNAME/AppData/Local/ModOrganizer/Fallout 4/ModOrganizer.ini'
[2024-04-18 07:44:41.481 D] timing: MOApplication::doOneRun() settings 86 ms
[2024-04-18 07:44:41.481 D] windows: version 10.0.22631, 22631.3447, release 23H2, 22621.1.amd64fre.ni_release.220506-1250, elevated: no
[2024-04-18 07:44:41.481 D] time zone: Bangladesh Standard Time, +06:00 (std is active, dst is Bangladesh Daylight Time, +07:00)
[2024-04-18 07:44:41.481 D] security products:
@AHS12
AHS12 / MakeDTOCommand.php
Last active January 6, 2024 15:15
generate basic DTO in laravel apps. command : php artisan make:dto
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputArgument;
class MakeDTOCommand extends Command
@AHS12
AHS12 / CustomHelper.php
Created May 23, 2022 18:19 — forked from reazul-islam/CustomHelper.php
English format to bangla on the run time
<?php
class Helper
{
public static $bn = ['১', '২', '৩', '৪', '৫', '৬', '৭', '৮', '৯', '০'];
public static $en = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '0'];
public static function bn2en($number)
{
@AHS12
AHS12 / remove-git-lfs.md
Last active October 5, 2021 21:15
Remove Git Lfs

So, it has been an interesting journey, but time to remove git-lfs. Here follows a summary of the approach I used to safely remove git-lfs,

  • commit & push everything
  • create a branch, something like fix/remove-lfs
  • remove hooks git lfs uninstall
  • remove lfs stuff from .gitattributes (open file, delete content - don't delete the file!)
  • list all lfs files, git lfs ls-files
  • run the commands

git lfs untrack '' (in my case, all files "*.*")

@AHS12
AHS12 / mysql_countries.sql
Created September 29, 2021 05:40 — forked from kamermans/mysql_countries.sql
MySQL Dump - continents and countries with 2 and 3 char codes, names and full names - Braintree compatible as of Dec 2011
/**
* Continents and Countries MySQL Tables compiled from Wikipedia, Braintree Payments documentation
* and a couple other places I don't recall at the moment. This data is compatible with the Braintree
* Payment API as of Dec 2011
*
* Compiled by Steve Kamerman, 2011
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
@AHS12
AHS12 / AppServiceProvider.php
Created September 6, 2021 08:27 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()