Skip to content

Instantly share code, notes, and snippets.

View mreduar's full-sized avatar

Eduar Bastidas mreduar

View GitHub Profile
@laravel-shift
laravel-shift / .php-cs-fixer.php
Last active March 29, 2025 12:18
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',
@nickwild-999
nickwild-999 / aws-slf-s3.js
Last active August 19, 2024 12:34
S3 Multipart upload with presigned url and progress in React
// this is my aws serverless function
const serverless = require('serverless-http');
const express = require('express');
const AWS = require('aws-sdk');
const app = express();
app.use(express.urlencoded({ extended: true }));
@joelconty
joelconty / fix.sh
Last active June 15, 2024 18:28
This script fixes permissions and ownership of your laravel files. Save it on the root of your project, make it executable and edit only the two lines indicated at the beginning of the script to set your username and the name of the group used by your web server (usually www-data). Then just run with sudo ( sudo ./fix.sh ) and start coding!
#!/usr/bin/env bash
#Configure these two variables
MYUSER="joel"
APACHEGROUP="www-data"
#you don't need to edit anything below.
echo "Setting variables..."
@secrethash
secrethash / composer.json
Last active January 13, 2023 02:18
Laravel Helper Function to create a Unique slug based on Provided Model Instance. Save 'slugify_model.php' in your 'app/Helpers/' directory and update your composer.json to reference and autoload the helper function.
{
...
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
},
"files": [
...
@claudiodekker
claudiodekker / megapint.sh
Created June 22, 2022 22:48
Opinionated Laravel Pint alias. Prefers a repo-specific version of pint over a globally-installed one, and defaults to use the Laravel preset.
megapint() {
PINT=$([ -f "vendor/bin/pint" ] && echo "vendor/bin/pint" || echo "pint")
"$PINT" --preset laravel $@
}
@ar1a
ar1a / comp.cfg
Created October 1, 2023 07:22
Dathost cs2 configs
// >>> DatHost Competitive Config 0.1 <<< //
// Reset from Practice to Competitive
sv_cheats "false" // Disable cheats
mp_ct_default_grenades "" // Spawn CTs without grenades
mp_t_default_grenades "" // Spawn Ts without grenades
sv_showimpacts "0" // Don't show bullet impacts
sv_falldamage_scale "1" // Enable fall damage
sv_full_alltalk "0" // Disable voice chat with anyone