Skip to content

Instantly share code, notes, and snippets.

View alisalehi1380's full-sized avatar
😊
Always smile at problems

Ali Salehi alisalehi1380

😊
Always smile at problems
View GitHub Profile
#my favorites alias in WSL
alias vite='s npm run dev'
alias sail='./vendor/bin/sail'
alias s='sail'
alias up='s up -d && vite'
alias down='s down'
alias a='s artisan'
alias aoclear='a optimize:clear'
alias amfs='a migrate:fresh --seed'
# SETUP #
DOMAIN=example.com
PROJECT_REPO="git@github.com: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)
@Mehrdad-Dadkhah
Mehrdad-Dadkhah / README.md
Last active April 5, 2025 14:30
High performance MySQL configuration with complete description and formulas.

MySQL Configuration Guide

Overview

This document provides a comprehensive explanation of the MySQL configuration settings used in the provided configuration file. The settings are optimized for a high-performance MySQL server with a focus on balancing memory usage, CPU utilization, and disk I/O efficiency. The comments in the file also include guidelines for adjusting parameters based on server hardware and workload characteristics.

General Settings

innodb_buffer_pool_size

  • Description: The size of the InnoDB buffer pool, which caches data and indexes from InnoDB tables.
@alisalehi1380
alisalehi1380 / clean_code.md
Last active October 5, 2024 18:52
نکات_کلیدی_کتاب_کلین_کد
کدی تمیز است که به راحتی توسط همه ی اعضای تیم قابل درک باشد. کد تمیز میتواند توسط توسعه دهنده ای به غیر از نویسنده ی آن، خوانده و توسعه داده شود. خوانایی، قابلیت نگهداری، تغییر و توسعه پذیری کد، تنها زمانی امکان پذیر است که شما درک درستی از نحوه ی کار کد پیدا کنید.

قوانین عمومی

@jonnyjava
jonnyjava / working_effectively_with_legacy_code.md
Created November 4, 2019 21:51
Working effectively with legacy code summary

WORKING EFFECTIVELY WITH LEGACY CODE

To me, legacy code is simply code without tests. I’ve gotten some grief for this definition. What do tests have to do with whether code is bad? To me, the answer is straightforward, and it is a point that I elaborate throughout the book: Code without tests is bad code. It doesn’t matter how well written it is; it doesn’t matter how pretty or object-oriented or well-encapsulated it is. With tests, we can change the behavior of our code quickly and verifiably. Without them, we really don’t know if our code is getting better or worse.

Chapter 1 Changing Software

Four Reasons to Change Software: For simplicity’s sake, let’s look at four primary reasons to change software.

@JakubOboza
JakubOboza / private-docker-regs-with-free-tiers.markdown
Created May 30, 2019 07:15
Private Docker registry with free tiers for Developers.

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry

@bmaupin
bmaupin / free-database-hosting.md
Last active December 8, 2025 06:52
Free database hosting
@ewwink
ewwink / http_response_code.php
Created February 14, 2016 02:30
PHP Class for HTTP Response Status Codes
<?php
/**
* StatusCodes provides named constants for
* HTTP protocol status codes. Written for the
* Recess Framework (http://www.recessframework.com/)
*
* @author Kris Jordan
* @license MIT
* @package recess.http
*