Skip to content

Instantly share code, notes, and snippets.

View joydeep-bhowmik's full-sized avatar
💭
Doing a little bit better every day

Joydeep Bhowmik joydeep-bhowmik

💭
Doing a little bit better every day
View GitHub Profile
@echo off
setlocal EnableDelayedExpansion
title Application Setup Wizard
color 0A
:: ================= INTRO =================
cls
echo =====================================
echo Application Setup Wizard
echo =====================================
@joydeep-bhowmik
joydeep-bhowmik / index.cmd
Created March 17, 2025 12:31
get directory structure in cmd
tree /f /a > output.txt
@joydeep-bhowmik
joydeep-bhowmik / index.md
Last active December 15, 2024 17:04
android app cant connect to localhost ?

android app cant connect to localhost ?

use this as you local api serever endpoint http://10.0.2.2:8000 instead of http://127.0.0.1:8000

@joydeep-bhowmik
joydeep-bhowmik / vscode.md
Created November 20, 2024 06:30
vscode settings

fix tailwind css intelisense

"editor.quickSuggestions": {
  "strings": true
},
"tailwindCSS.experimental.classRegex": [
  ["class\\s*[:=]\\s*[\"'`]([^\"'`]*).*", 1]
]
$updateOrder = function ($items) {
    $ids = collect($items)->pluck('value')->toArray();

    Photo::whereIn('id', $ids)
        ->get()
        ->each(function ($item) use ($ids) {
            $item->update(['ordering' => array_search($item->id, $ids)]);
        });
@joydeep-bhowmik
joydeep-bhowmik / index.md
Last active June 25, 2024 08:17
WordPress showing old page even after upated

WordPress showing old page even after upated

This thing happends mainly due to browser or server cache

If this problem is because of browser cache then we can hardreload the browser (ctrl + f5)

if this is because of server cache then you can replace default htaccess with the htaccess provided in wordpress documentation

RewriteEngine On
@joydeep-bhowmik
joydeep-bhowmik / index.md
Last active June 15, 2024 11:24
composer dump-autoload is slow

composer dump-autoload is slow

View original post

For anybody new coming across this. the fix for me was a combination of things, before which the generating optimised autoload files took over 260s.

First adding : "https://packagist.org" to repositories in composer.json.

"repositories": [ { "type": "composer", "url": "https://packagist.org" } ]
import {
ChangeEvent,
HTMLInputTypeAttribute,
useState,
useRef,
useId,
HTMLProps,
} from "react";
import { mediaUrl } from "@/lib/utils";
@joydeep-bhowmik
joydeep-bhowmik / Datatable.tsx
Last active May 13, 2024 09:39
Laravel react datatabe component
import Section from "@/Components/Section";
import axios from "axios";
import { ReactNode, useState } from "react";
import DataTable from "react-data-table-component";
import { useQuery } from "react-query";
import { debounce } from "lodash";
import TextInput from "@/Components/TextInput";
import { useQueryClient } from "react-query";
import { $on } from "@/lib/utils";
@joydeep-bhowmik
joydeep-bhowmik / Laravel Scout egar loading.md
Last active May 16, 2024 09:56
Laravel Egarloading with scout search

Laravel Egarloading with scout search

Suppose this is your category model

class Category extends Model
{
    use HasFactory, Searchable;

    public function toSearchableArray(): array
 {