Skip to content

Instantly share code, notes, and snippets.

View ahmadrio's full-sized avatar
🇮🇩
Working from home

Ahmad Rio ahmadrio

🇮🇩
Working from home
View GitHub Profile
@kupietools
kupietools / Docker Desktop v 4.0.0 thru 4.22.1 direct download links
Last active July 21, 2024 10:07
List of Direct Download links for Docker Desktop from version 4.0.0 released 2021-08-31 thru 4.22.1 released 2023-08-24, as archived on archive.org
@duongdam
duongdam / bun-js-dockerfile
Last active April 15, 2024 09:22
Dockerfile for Bun API with size reduced to 298Mb
#Simple size about 298Mb. Bun v1.0.21
FROM oven/bun:latest as build-stage
WORKDIR /dist
COPY . .
COPY .env.production .env
COPY package.json package.json
COPY bun.lockb bun.lockb
@SerhiiCho
SerhiiCho / pint.json
Last active May 27, 2024 03:49
Configuration file for Laravel Pint
{
"preset": "psr12",
"rules": {
"is_null": true,
"declare_strict_types": true,
"strict_comparison": true,
"no_unused_imports": true,
"explicit_string_variable": true,
"native_function_casing": true,
"native_function_type_declaration_casing": true,
@mkeneqa
mkeneqa / launch_phpstorm_from_terminal.md
Last active May 7, 2024 21:12
Launch PHP Strom from Terminal (Mac OS)

Create Script

nano launch_phpstorm.sh


#!/bin/sh

open -na "Phpstorm.app" --args "$@"
@altynbek07
altynbek07 / README.md
Last active March 25, 2022 22:42
Switch PHP Version in Laravel Valet

Switch PHP Version in Laravel Valet

For me, the valet use php@7.3 command does not work. And so I created this bash function.

Install

I already have PHP versions 7.2, 7.3 and 7.4 installed via Homebrew. Add this function in your .bash_profile or .zshrc file:

# Switch PHP version
switch-php() {
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active July 17, 2024 16:29
PHP CS Fixer - Laravel Coding Style Ruleset
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => [
'default' => 'single_space',
@cravacuore
cravacuore / raw.zsh-theme
Created September 24, 2018 14:03
Zsh 'raw' theme I made by copying various ideas from other themes into one
# Inspired by making a mixture the following themes:
# robbyrussell + arrow + lambda
# changing some colors and elements positions
local ret_status="%(?:%{$fg_bold[grey]%}λ :%{$fg_bold[red]%} λ )"
PROMPT=' ${ret_status}%{$fg[magenta]%}%c %{$fg[black]%}➤ %{$reset_color%}'
RPROMPT='$(git_prompt_info) %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[grey]%}git:(%{$fg[cyan]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
@JBlond
JBlond / phpcs.xml
Created July 11, 2018 14:57
php code sniffer config
<?xml version="1.0" encoding="UTF-8"?>
<!--suppress XmlUnboundNsPrefix, XmlUnboundNsPrefix -->
<ruleset name="overview">
<description>overview</description>
<rule ref="Generic.Classes.DuplicateClassName"/>
<rule ref="Generic.CodeAnalysis.EmptyStatement"/>
<rule ref="Generic.CodeAnalysis.ForLoopShouldBeWhileLoop"/>
<rule ref="Generic.CodeAnalysis.ForLoopWithTestFunctionCall"/>
<rule ref="Generic.CodeAnalysis.UnconditionalIfStatement"/>
<rule ref="Generic.CodeAnalysis.UselessOverridingMethod"/>
@EmadAdly
EmadAdly / Add-ESLint-to-Laravel-Mix.md
Last active January 20, 2024 16:55
Adding eslint to your Laravel application

1. Add eslint and eslint-loader and eslint-plugin-vue to your projects package.json file

npm i eslint eslint-loader eslint-plugin-vue --save-dev

2. Create a base configuration by --init

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called

.gitignore

In your the root directory of your app and simply write