Skip to content

Instantly share code, notes, and snippets.

View amitavroy's full-sized avatar
🏠
Working from home

Amitav Roy amitavroy

🏠
Working from home
View GitHub Profile
@amitavroy
amitavroy / .php-cs-fixer.php
Created December 5, 2021 08:34
php cs fixer rules for Laravel
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => ['=>' => null],
@amitavroy
amitavroy / button.tsx
Last active May 10, 2022 04:14
Some useful React codes
// A sample button component with proper Typescript definitions
// and it also spreads all props coming from the parent component
import { HTMLAttributes, ReactNode } from "react";
interface Props extends HTMLAttributes<HTMLButtonElement> {
children: ReactNode;
variant: "primary" | "secondary";
}
@amitavroy
amitavroy / docker-compose.yml
Created May 11, 2024 06:35
Running Sonarqube on Docker and then scan a local codebase
version: "3.8"
services:
sonarqube:
container_name: sonarqube
image: sonarqube
depends_on:
- sonarqube-database
environment:
- SONARQUBE_JDBC_USERNAME=sonarqube
- SONARQUBE_JDBC_PASSWORD=sonarpass