Skip to content

Instantly share code, notes, and snippets.

View ImaginativeShohag's full-sized avatar
🍟
Already hungry...

Md. Mahmudul Hasan Shohag ImaginativeShohag

🍟
Already hungry...
View GitHub Profile

Keybase proof

I hereby claim: * I am imaginativeshohag on github. * I am imshohag (https://keybase.io/imshohag) on keybase. * I have a public key ASCmrYOpcYqJupNMG5Nj3rbTq-HU8UZdd5MdN8qEKoHNkAo To claim this, I am signing this object:

{   "body": {     "key": {       "eldest_kid": "0120a6ad83a9718a89ba934c1b9363deb6d3abe1d4f1465d77931d37ca842a81cd900a",       "host": "keybase.io",       "kid": "0120a6ad83a9718a89ba934c1b9363deb6d3abe1d4f1465d77931d37ca842a81cd900a",       "uid": "292f8d4922673dd8de6b11fc0ff28c19",       "username": "imshohag"     },     "merkle_root": {       "ctime": 1535416578,       "hash": "14050c214ae3d0747bd429a0f51f9f326b8279c0c586712e891b146facef0066d6e120a88450c47a95f396d71071d115abd95a3657efc643e1330db028d34f45",       "hash_meta": "87171f405f2f23e6564c408c50989bda54d8c362675dfcc91f979813bb708231",       "seqno": 3523929     },     "service": {       "entropy": "c+rm4FckA5p/3aVJ+hpZ5PWi",       "name": "github",       "username": "imaginativeshohag"     },     
<?php
/**
* Gist by:
* Md. Mahmudul Hasan Shohag
* imaginativeshohag@gmail.com
*
* Help Doc:
* - https://firebase.google.com/docs/cloud-messaging/http-server-ref
*
* How to get FCM Server Kay:
<?php
/**
* Gist by:
* Md. Mahmudul Hasan Shohag
* imaginativeshohag@gmail.com
*
* Help Doc:
* - https://firebase.google.com/docs/cloud-messaging/http-server-ref
*
* How to get FCM Server Kay:
@ImaginativeShohag
ImaginativeShohag / android_libraries_and_tools.md
Last active March 1, 2022 08:22
Android Libraries & Tools
@ImaginativeShohag
ImaginativeShohag / Retrofit2ApiClient.java
Last active June 30, 2019 17:07
Retrofit 2 Api Client Class
import okhttp3.OkHttpClient;
import okhttp3.logging.HttpLoggingInterceptor;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
public class ApiClient {
private static Retrofit retrofit = null;
private static OkHttpClient buildClient() {
@ImaginativeShohag
ImaginativeShohag / Retrofit2MultiPartFileUploadApiInterface.java
Created June 30, 2019 19:07
Retrofit2 Multi Part File Upload ApiInterface class
import java.util.List;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
public interface ApiInterface {
@ImaginativeShohag
ImaginativeShohag / How to Create and Use a VeraCrypt Container.md
Last active February 23, 2024 06:06
How to Create and Use a VeraCrypt Container

Create a VeraCrypt container

Step 1: Install VeraCrypt from https://www.veracrypt.fr

Step 2: Open VeraCrypt and Click Create Volume

Step 3: Selete what type of container you want to create

Encrypted file container

To create a file as a encrypted container select Create an encrypted file container.

@ImaginativeShohag
ImaginativeShohag / push-to-multi-repository.sh
Last active August 6, 2019 12:31
Script for Pushing Source Code to Multiple Git Repository.
#!/bin/bash
# ================================================================================
# This script will push source code to other repository.
# Version: 1.0
#
# Coded by:
# Md. Mahmudul Hasan Shohag
# imaginativeshohag@gmail.com
# github.com/ImaginativeShohag
@ImaginativeShohag
ImaginativeShohag / ubuntu_change_resolution.sh
Created July 13, 2019 03:49
Ubuntu: Change monitor resolution of Unknown Display
#!/bin/bash
xrandr --newmode $(cvt 1920 1080 60 | grep Mode | sed -e 's/.*"/1920x1080/') 2> /dev/null
xrandr --addmode VGA-1 1920x1080
xrandr --output VGA-1 --mode 1920x1080
@ImaginativeShohag
ImaginativeShohag / RealPathUtil.java
Last active December 8, 2022 04:49
Real Path Utility class for Android. Tested till API 29. Kotlin version: https://gist.github.com/ImaginativeShohag/4e53572141c017369941bbbaac538576
import android.annotation.SuppressLint;
import android.content.ContentUris;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.os.Build;
import android.os.Environment;
import android.provider.DocumentsContract;
import android.provider.MediaStore;