Skip to content

Instantly share code, notes, and snippets.

View 4msar's full-sized avatar
🧑‍💻
Working...

Saiful Alam Rakib 4msar

🧑‍💻
Working...
View GitHub Profile
@4msar
4msar / laravel-server-setup.sh
Created November 9, 2024 11:56 — forked from tarikmanoar/laravel-server-setup.sh
This script help you to setup laravel prodcution ready by one click
#!/bin/bash
# Colors for output
GREEN='\033[0;32m'
NC='\033[0m'
# Function to update and upgrade system
update_system() {
echo -e "${GREEN}Updating and upgrading the system...${NC}"
sudo apt update -y && sudo apt upgrade -y
# SETUP #
DOMAIN=example.com
PROJECT_REPO="[email protected]:example.com/app.git"
AMOUNT_KEEP_RELEASES=5
RELEASE_NAME=$(date +%s--%Y_%m_%d--%H_%M_%S)
RELEASES_DIRECTORY=~/$DOMAIN/releases
DEPLOYMENT_DIRECTORY=$RELEASES_DIRECTORY/$RELEASE_NAME
# stop script on error signal (-e) and undefined variables (-u)
@4msar
4msar / nginx-server-block-generator.sh
Created August 1, 2022 05:46 — forked from 0xAliRaza/nginx-server-block-generator.sh
A handy shell script to create Nginx server-block (virtual host).
#!/usr/bin/env bash
#
# Nginx - new server block
# Functions
ok() { echo -e '\e[32m'$1'\e[m'; } # Green
die() {
echo -e '\e[1;31m'$1'\e[m'
exit 1
}
@4msar
4msar / conventional_commit_messages.md
Created January 26, 2022 11:04 — forked from qoomon/conventional-commits-cheatsheet.md
Conventional Commit Messages

Conventinal Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@4msar
4msar / php-style-guide.md
Created February 17, 2021 18:44 — forked from ryansechrest/php-style-guide.md
PHP style guide with coding standards and best practices.

PHP Style Guide

All rules and guidelines in this document apply to PHP files unless otherwise noted. References to PHP/HTML files can be interpreted as files that primarily contain HTML, but use PHP for templating purposes.

The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

Most sections are broken up into two parts:

  1. Overview of all rules with a quick example
  2. Each rule called out with examples of do's and don'ts
@4msar
4msar / AdbCommands
Created December 6, 2020 15:52 — forked from Pulimet/AdbCommands
Adb useful commands list
adb help // List all comands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader