Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Laravel Sail Application Quick Setup Script
set -e # Exit on any error
echo "🚀 Starting Laravel (Sail) Application Setup..."
# Colors for output
RED='\033[0;31m'
@mirashif
mirashif / CustomResource.ts
Created October 25, 2025 15:38
Monkey patched Adminjs to support our multi-tenant app
import { Resource, convertFilter, convertParam, getModelByName } from '@adminjs/prisma'
import type { Filter } from 'adminjs'
import { BaseRecord, flat } from 'adminjs'
import { getPrismaClient, getPrismaClientAdminjs } from '../../prisma/util.js'
import type { int } from 'aws-sdk/clients/datapipeline.js'
import { DMMF } from '@prisma/client/runtime/library.js';
/*
Our schema is:
Booking:
id: int

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@mirashif
mirashif / package.json
Created November 7, 2022 11:26 — forked from jherr/package.json
Simple monorepo starter
{
"name": "packages",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": true,
"scripts": {
"start": "concurrently \"wsrun --parallel start\""
},
"workspaces": [
@mirashif
mirashif / .config
Last active February 14, 2023 21:25
How to set Oh My Posh theme
# windows bash
eval "$(oh-my-posh init bash --config ${POSH_THEMES_PATH}/uew.omp.json)"
# macos zsh
eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/uew.omp.json)"
@mirashif
mirashif / css-reset.css
Created September 10, 2022 19:17
Resets default CSS rules set by the web browsers
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
@mirashif
mirashif / toggle-virtualization.bat
Created July 16, 2022 13:39 — forked from jonpulsifer/toggle-virtualization.bat
Virtualization must be disabled to use CS:GO anti-cheat clients like FACEIT and ESEA, but I like to use WSL2 and Docker, and this script helps me do that
@echo off
echo Virtualization must be disabled to use anti-cheat clients like FACEIT and ESEA
echo.
net session >nul 2>&1
if %ERRORLEVEL% EQU 0 goto :chchchchoices
echo This script requires elevated privileges. Re-run as Administrator to continue
goto :exit
:chchchchoices
@mirashif
mirashif / react-native-setup.md
Created July 1, 2021 13:57
React native project initial setup process.

Initial project setup

  • Initialize expo app:
    expo init my-app
  • Template:
    blank typescript
  • Add strict tsconfig.json
    "compilerOptions": {
    "allowSyntheticDefaultImports": true,
    "jsx": "react-native",
@mirashif
mirashif / arrayFlat.js
Created June 10, 2021 14:40
Here is a quick way to flatten a deeply nested array in Javascript.
const nested = [1, 2, [3, 4, [5, 6, [7, 8, [9, 10]]]]];
const flatten = nested.flat(Infinity);
// [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
const result = flatten.join(", ");
// "1, 2, 3, 4, 5, 6, 7, 8, 9, 10"
@mirashif
mirashif / probhat.md
Last active May 3, 2023 14:12
Probhat unusual keyboard layout cheatsheet

স্বরবর্ণঃ

আ = v

ঈ = E

ঊ = W

ঋ = V