Skip to content

Instantly share code, notes, and snippets.

View arshohag's full-sized avatar
🎯
Focusing

Ashiqur Rahman arshohag

🎯
Focusing
View GitHub Profile
@arshohag
arshohag / phone-validation-sg-laravel.php
Last active November 5, 2022 17:35
Singapore Phone Number validation in Laravel
<?php
$this->validate($request, [
'phone' => 'regex:/^\+65(6|8|9)\d{7}$/',
]);
// It will validate SG phone numbers without a required parameter in laravel using validator.
@minhajul-islam
minhajul-islam / API_STATUS
Created November 20, 2019 05:07
List of HTTP status codes
export const API_STATUS = {
//1×× Informational
AS_100: {'CODE':100,'DES': 'Continue'},
AS_101: {'CODE':101,'DES': 'Switching Protocols'},
AS_102: {'CODE':102,'DES': 'Processing'},
//2×× Success
AS_200: {'CODE':200,'DES': 'OK'},
AS_201: {'CODE':201,'DES': 'Created'},
AS_202: {'CODE':202,'DES': 'Accepted'},
AS_203: {'CODE':203,'DES': 'Non-authoritative Information'},
@robsonsanches
robsonsanches / transitions.css
Last active February 18, 2025 00:18
Force Bootstrap v4 transitions (ignores prefers-reduced-motion media feature)
/*
* Force Bootstrap v4 transitions
* (ignores prefers-reduced-motion media feature)
* https://gist.github.com/robsonsanches/33c6c1bf4dd5cf3c259009775883d1c0
*/
.fade {
transition:opacity 0.15s linear !important;
}
.collapsing {
@ywwwtseng
ywwwtseng / host-react-app-on-apache-server.md
Last active August 5, 2025 18:26
Host react application on Apache server

Host react application on Apache server

Step 1 : Create your app

$ npm install -g create-react-app 
$ create-react-app my-app

Step 2 : Build it for production

@MohammadaliMirhamed
MohammadaliMirhamed / PhpFireBaseNotificationSample.php
Last active December 28, 2024 22:56
This repository showcases a simple and effective script to send push notifications to Android devices using Firebase Cloud Messaging (FCM). Designed for developers, the code provides a quick setup for integrating FCM notifications with minimal configuration.
<?php
#API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = $_GET['id'];
#prep the bundle
$msg = array
(
'body' => 'Body Of Notification',
@schnell18
schnell18 / macosx_remove_java9.sh
Created October 8, 2016 13:26
MacOS X remove Java 9
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane
@mrabbani
mrabbani / mailgun-config.md
Last active January 8, 2024 01:45
Laravel Mailgun Setup
@Michael-Brooks
Michael-Brooks / passwordValidation.php
Last active July 7, 2024 03:44
Laravel Password validation Regex (Contain at least one uppercase/lowercase letters and one number)
<?php
/*
* Place this with the rest of your rules.
* Doesn't need to be in an array as there are no pipes.
* Password is required with a minimum of 6 characters
* Should have at least 1 lowercase AND 1 uppercase AND 1 number
*/
$rules = [
'password' => 'required|min:6|regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'
];
@messified
messified / php-interview.md
Last active August 30, 2025 14:31
PHP Engineer Interview: What you should know

PHP Developer Interview: What you should know

1. What’s the difference between " self " and " this " ?

Use $this to refer to the current object. Use self to refer to the current class. In other words, use $this->member for non-static members, use self::$member for static members.

Source: When to use self vs this -stackoverflow