Skip to content

Instantly share code, notes, and snippets.

View tazeverywhere's full-sized avatar

Sylvain tazeverywhere

View GitHub Profile
<?php
/** @noinspection PhpUnused */
namespace App\Http\Livewire\Traits;
use Exception;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
use Livewire\Component;
@tazeverywhere
tazeverywhere / .htaccess
Created February 3, 2025 21:26 — forked from seoagentur-hamburg/.htaccess
UPDATE 2024/03: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.9 - 03/2024
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@tazeverywhere
tazeverywhere / .php-cs-fixer.php
Created January 15, 2025 12:01 — forked from laravel-shift/.php-cs-fixer.php
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',
@tazeverywhere
tazeverywhere / .env.example
Created December 9, 2024 15:33 — forked from valorin/.env.example
CSP Middleware - the simple CSP middleware I use across all of my projects.
# Add to your .env.example and .env files
CSP_ENABLED=true
CSP_REPORT_ONLY=true
@tazeverywhere
tazeverywhere / .env
Created June 14, 2024 13:43 — forked from Nilpo/.env
Enabling HTTPS (SSL) for Laravel Sail using Caddy
APP_URL=https://laravel.test
APP_SERVICE=laravel.test
[...]
@tazeverywhere
tazeverywhere / .htaccess
Created August 24, 2023 15:45 — forked from nasrulhazim/.htaccess
Laravel .htaccess with Security & Optimisation
# Directory Listing
Options -Indexes
<IfModule mod_security.c>
# Server Information Disclosure
ServerTokens Prod
ServerSignature Off
SecServerSignature " "
</IfModule>
@tazeverywhere
tazeverywhere / functions.php
Created December 7, 2022 15:35 — forked from Idealien/functions.php
Gravity Flow - Test scenario for custom/default sort order in status view
<?php
add_filter('gform_entry_meta', 'custom_entry_meta90', 12, 2);
function custom_entry_meta90( $entry_meta, $form_id ) {
$entry_meta['prioridadNUM'] = array(
'label' => 'Prioridad NUM',
'is_numeric' => true,
'update_entry_meta_callback' => 'update_entry_meta90',
'is_default_column' => true,
);
return $entry_meta;
@tazeverywhere
tazeverywhere / wp-custom-reset-password-form.php
Created August 17, 2022 15:44 — forked from iqbalrony/wp-custom-reset-password-form.php
WordPress custom reset password form
<?php
/*
*Example Follw:-https://code.tutsplus.com/tutorials/build-a-custom-wordpress-user-flow-part-3-password-reset--cms-23811
*/
// Create the custom pages at plugin activation
register_activation_hook( __FILE__, 'dgm_plugin_activated' );
function dgm_plugin_activated() {
// Information needed for creating the plugin's pages
$page_definitions = array(
@tazeverywhere
tazeverywhere / mu-sanitize-filename.php
Created January 10, 2021 16:20 — forked from wpchannel/mu-sanitize-filename.php
Clean file name when uploading in WordPress
<?php if (!defined('ABSPATH')) die('Restricted Area');
/*
* Plugin Name: Sanitize File Name
* Description: Clean file name when uploading files in WordPress.
* Version: 20180218
* Author: Mickaël Gris (Neticpro)
* Author URI: https://wpchannel.com/renommer-automatiquement-fichiers-accentues-wordpress/
*/
<?php
/*
* Plugin Name: Rewrite Wordpress uploads URLs
* Plugin URI: https://permalinkmanager.pro?utm_source=plugin
* Description: Replace /wp-content/uploads/YYYY/MM/ with different directory
* Version: 1.0.0
* Author: Maciej Bis
* Author URI: http://maciejbis.net/
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt