Skip to content

Instantly share code, notes, and snippets.

View shibbirweb's full-sized avatar
Happy Coding

MD. Shibbir Ahmed shibbirweb

Happy Coding
View GitHub Profile
@shibbirweb
shibbirweb / Api.kt
Last active February 4, 2024 09:58
Android - Kotlin - Retrofit Authorization Token Interceptor
package com.***.data.apis
import android.content.Context
import com.****.data.apis.interceptor.ApiAcceptInterceptor
import com.****.data.apis.interceptor.AuthorizationTokenInterceptor
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.gson.GsonConverterFactory
import java.util.concurrent.TimeUnit
@shibbirweb
shibbirweb / .eslintrc.js
Created July 21, 2023 12:07 — forked from onlime/.eslintrc.js
Configure ESLint and Prettier for Vue/Nuxt.js project in VS Code
module.exports = {
root: true,
env: {
browser: true,
node: true,
},
parserOptions: {
parser: '@babel/eslint-parser',
requireConfigFile: false,
},
@shibbirweb
shibbirweb / ErrorParser.kt
Last active July 10, 2023 22:40
Android Error Parser for Retrofit in Kotlin (Laravel API)
package com.*.utilities.parser
import com.google.gson.Gson
import com.google.gson.reflect.TypeToken
import okhttp3.ResponseBody
/**
*
* Laravel error parser
*
https://github.com/nuxt-community/auth-module/issues/258
@shibbirweb
shibbirweb / config.ini
Created June 22, 2023 01:22
Street Fighter 6 Low Configuration
[Render]
Capability=DirectX12
[Graphics]
EnableUserSettings=TRUE
GlobalSettings=Custom
MaxFramerate=30
TextureQuality=LOWEST
ShaderQuality=STANDARD
LightingQuality=LOWEST
EffectQuality=STANDARD
@shibbirweb
shibbirweb / DataStoreManager.kt
Last active April 17, 2023 14:02
Android - Kotlin - Data Store Manager
package com.***.data.dataStoreManager
import android.content.Context
import androidx.datastore.core.DataStore
import androidx.datastore.preferences.core.*
import androidx.datastore.preferences.preferencesDataStore
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.flow.map
@shibbirweb
shibbirweb / 1ReadMe.md
Last active February 21, 2023 13:33
Laravel Bangladesh GEO Locaiton Migration, Seeder, Model

How to use

  1. After download all files from gist place files in correct folder follow as File Hierarchy (Given below).
  2. Run those command serially
composer dump-autoload

php artisan migrate
@shibbirweb
shibbirweb / SpinnerComponent.vue
Last active February 21, 2023 13:25
Nuxt axios request event hadling with prelaoder
<!--
components/SpinnerComponent.vue
Here usages bootstrap spinner class to show preloader
-->
<template>
<div class="preloader">
<div class="spinner-border" style="width: 3rem; height: 3rem;" role="status">
<span class="visually-hidden">Loading...</span>
@shibbirweb
shibbirweb / helperFunctions.php
Created January 29, 2023 10:04
Laravel vite unique hot path
<?php
// add custom global helper function here
use Illuminate\Support\Facades\Vite as ViteFacade;
if (!function_exists('module_vite_assets_unique_hot_path')) {
/**
* Support for vite assets with unique hot path
*
@shibbirweb
shibbirweb / backward_forward_unit_converter.php
Created December 28, 2022 06:05
Backward and forward unit converter
<?php
// Function to convert a value from one unit to another
function convert_unit($value, $from_unit, $to_unit) {
// Conversion factors
$conversions = [
'meter' => [
'inch' => 39.3700787,
'foot' => 3.2808399,
'yard' => 1.0936133,