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 / .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,
},
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 / 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,
@shibbirweb
shibbirweb / DirectiveServiceProvider.php
Created December 21, 2022 14:04
Laravel helpful custom directive
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class DirectiveServiceProvider extends ServiceProvider
{
/**
@shibbirweb
shibbirweb / RecyclerViewBindingAdapterCustomBindingFunction.kt
Created November 27, 2022 05:47
Andorid - Kotlin - RecyclerView View binding adapter with memory leak fix
@BindingAdapter(
value = ["android:custom_setAdapter", "android:custom_showItemDivider"],
requireAll = false
)
fun RecyclerView.bindRecyclerViewAdapter(
adapter: RecyclerView.Adapter<*>,
showItemDivider: Boolean = false
) {
this.setHasFixedSize(true)
this.adapter = adapter
@shibbirweb
shibbirweb / DiffUtilItemListRecyclerViewAdapter.kt
Created November 23, 2022 09:44
Android Kotlin - Recycler View DiffUtil.ItemCallback
import android.view.LayoutInflater
import android.view.ViewGroup
import android.widget.ImageView
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.AsyncListDiffer
import androidx.recyclerview.widget.DiffUtil
import androidx.recyclerview.widget.RecyclerView
class QuestionBankListRecyclerViewAdapter(
@shibbirweb
shibbirweb / SecureHelpersTrait.php
Created November 2, 2022 06:51
Laravel Secure Helper Trait
<?php
namespace App\Models\Traits\ModelHelpers;
use Illuminate\Support\Str;
trait SecureHelperTrait
{
/**
* Mask user secret data.
@shibbirweb
shibbirweb / AuthenticationRepository.kt
Created October 26, 2022 10:28
Android - Kotlin: Laravel Validation Error Parser (Retrofit with Moshi)
package com.data.repositories.authentication
import com.data.apis.Api
import com.data.apis.endpoints.authentication.AuthenticationApi
import com.data.apis.models.generic.LaravelValidationErrors
import com.data.apis.models.requests.auth.LoginRequest
import com.data.apis.models.requests.auth.LoginRequestErrors
import com.data.apis.models.responses.auth.LoginResponse
import com.data.helpers.Errors.*
import com.data.helpers.Resource