Skip to content

Instantly share code, notes, and snippets.

View tazeverywhere's full-sized avatar

Sylvain tazeverywhere

View GitHub Profile
@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
@tazeverywhere
tazeverywhere / functions.php
Created September 11, 2020 16:59 — forked from cliffordp/functions.php
The Events Calendar - Event Aggregator: hijack event time zone before import
<?php
/**
* The Events Calendar - Event Aggregator: hijack event time zone before import
* Must change code to accomodate your desired time zone
*
* From https://gist.github.com/cliffordp/f2cf6b3ce9f33c7ff17988c824d67e21
*
* By Nico 2017-01-12
*/
@tazeverywhere
tazeverywhere / keybase.md
Created June 12, 2019 09:19
I am tazeverywhere on github

Keybase proof

I hereby claim:

  • I am tazeverywhere on github.
  • I am shess (https://keybase.io/shess) on keybase.
  • I have a public key ASCpCfkgtuKcVLXHjj8zd4p00ZHvtzryEcemILUdphgPwAo

To claim this, I am signing this object:

@tazeverywhere
tazeverywhere / deploy.php
Last active May 3, 2019 16:19
Deployer extended for typo3 - file `deploy.php` with infomaniak shared hosting. @see https://github.com/sourcebroker/deployer-extended-typo3 for full config & install
<?php
namespace Deployer;
require_once(__DIR__ . '/vendor/sourcebroker/deployer-loader/autoload.php');
new \SourceBroker\DeployerExtendedTypo3\Loader();
set('repository', 'git@git.yourdomain.git:yourgroup/yourepo.git');
set('http_user', 'uidXXXXX'); // @see infomaniak http-user (owner)
// @NOTE: put .bashrc with "source ~/.profile" into, at root infomaniak to be able to read alias and $PATH info (ex: php-cli path)
@tazeverywhere
tazeverywhere / db_utf8_fix.php
Created November 30, 2018 12:06 — forked from jaguerra/db_utf8_fix.php
Script to convert TYPO3 DB from latin1 to UTF8. Includes conversion of fields containing serialized PHP arrays into binary fields to avoid breakage.
<?php
/******************************************/
// db_utf8_fix.php //
// Original author: J. van Hemert //
// Original Date: 26-10-2011 //
// //
// Fixes encoding when utf-8-encoded data //
// is stored in tables with other (e.g. //
// latin_swedish_ci) encoding. //
// Will convert all columns in all tables //
@tazeverywhere
tazeverywhere / functions.php
Created July 26, 2018 09:58 — forked from butlerblog/functions.php
SMTP using wp-config.php for settings
<?php // Don't use this line.
/**
* This function will connect wp_mail to your authenticated
* SMTP server. This improves reliability of wp_mail, and
* avoids many potential problems.
*
* Values are constants set in wp-config.php
*/
add_action( 'phpmailer_init', 'send_smtp_email' );