Skip to content

Instantly share code, notes, and snippets.

View siddik-web's full-sized avatar
🎯
Focusing

Md Siddiqur Rahman siddik-web

🎯
Focusing
View GitHub Profile
@siddik-web
siddik-web / wpcs-guide.md
Last active July 12, 2024 00:10
WordPress Coding Standard Setup for VSCode Local Project

1. VSCode settigns file settgins.json

Save this into .vscode folder

{
    "[php]": {
        "editor.defaultFormatter": "wongjn.php-sniffer"
    },
    "phpSniffer.enable": true,
    "phpSniffer.standard": "WordPress",
    "phpSniffer.autoDetect": true,
@siddik-web
siddik-web / service-provider.php
Last active April 3, 2023 14:56
PHP Service Provider Pattern
interface PaymentGateway {
public function pay($amount);
}
require_once('vendor/autoload.php'); // Load PayPal PHP SDK
use PayPalCheckoutSdk\Core\PayPalHttpClient;
use PayPalCheckoutSdk\Core\SandboxEnvironment;
use PayPalCheckoutSdk\Orders\OrdersCreateRequest;
@siddik-web
siddik-web / solid-php
Created January 31, 2023 17:22
SOLID With PHP
<?php
interface DownloadInterface
{
public function download();
}
interface PrintInterface
{
public function print();

Setting up Webpack for any Typescript project from Scratch

Welcome to step by step hands-on guide to setup webpack in your upcoming typescript project. Please follow the steps and you should be able to create your own webpack project. Please download the source code from github.

You will learn below things:

  1. ✅Create a Typescript node.js project.
  2. ✅Install Dependencies with webpack & typescripts.
  3. ✅Use Webpack CLI to crate webpack.config.js file and modify webpack.config.js based on our need.
theme: ThemeData(fontFamily: 'Raleway')
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: "Custom Fonts in Flutter",
debugShowCheckedModeBanner: false,
Text(
"Hello World!",
style: TextStyle(
decoration: TextDecoration.none,
fontFamily: 'Roboto',
fontSize: 50,
),
),
Text(
"Hello World!",
fonts:
- family: Raleway
fonts:
- asset: fonts/Raleway-Bold.ttf
weight: 700
- asset: fonts/Raleway-Light.ttf
- family: Roboto
fonts:
- asset: fonts/Roboto-Bold.ttf
weight: 700
@siddik-web
siddik-web / useful links.txt
Last active February 19, 2022 13:00
snippet generator
@siddik-web
siddik-web / switch between PHP versions
Created February 9, 2022 16:40
Switching between multiple PHP versions on macOS
brew list | grep php
brew install php@5.6
brew install php@7.0
brew install php@7.1
brew install php@7.2
brew install php@7.3
brew install php@7.4
# Switch from 8.1 to 7.4