Skip to content

Instantly share code, notes, and snippets.

View mreduar's full-sized avatar

Eduar Bastidas mreduar

View GitHub Profile
@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
@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 $@
}
@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": [
...
@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..."
@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 }));
@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',
@fzldn
fzldn / beautifier.js
Last active March 17, 2025 02:29
VS Code Laravel Blade formatter using extension Beautify 1.5.0 by HookyQR with js-beautify hacks
...
Beautifier.prototype.beautify = function() {
...
var source_text = this._source_text;
// BEGIN
source_text = source_text.replace(/\{\{(--)?((?:(?!(--)?\}\}).)+)(--)?\}\}/g, function(m, ds, c, dh, de) {
@ankurk91
ankurk91 / laravel_horizon.md
Last active January 23, 2025 05:08
Laravel Horizon, redis/valkey-server, supervisord on Ubuntu server

Laravel Horizon, redis-server, supervisord on Ubuntu 20/22/24 server

Laravel 10+, Horizon 5.x, Redis/Valkey 7+

Prepare application

  • Install and configure Laravel Horizon as instructed in docs
  • Make sure you can access the Horizon dashboard like - http://yourapp.com/horizon
  • For now; it should show status as inactive on horizon dashboard

Install redis-server

@paulund
paulund / phpcs.xml
Created August 20, 2017 16:50
PHP PSR-2 CodeSniffer Config for Laravel
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<!--
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.
-->
@sdrew
sdrew / Procfile
Last active July 27, 2021 15:25
Laravel configs for Heroku/Dokku
web: vendor/bin/heroku-php-apache2 public/