Skip to content

Instantly share code, notes, and snippets.

View tazeverywhere's full-sized avatar

Sylvain tazeverywhere

View GitHub Profile
@Nilpo
Nilpo / .env
Last active June 14, 2024 13:43 — forked from gilbitron/CaddyController.php
Enabling HTTPS (SSL) for Laravel Sail using Caddy
APP_URL=https://laravel.test
APP_SERVICE=laravel.test
[...]
@nasrulhazim
nasrulhazim / .htaccess
Last active November 15, 2023 03:43
Laravel .htaccess with Security & Optimisation
# Directory Listing
Options -Indexes
<IfModule mod_security.c>
# Server Information Disclosure
ServerTokens Prod
ServerSignature Off
SecServerSignature " "
</IfModule>
@schlessera
schlessera / Controller.php
Last active November 5, 2020 13:31
Example of bootstrapping a WordPress plugin.
<?php
// file: src/Controller.php
/**
* Example Plugin Controller.
*/
namespace Example\Plugin;
use BrightNucleus\Config\ConfigInterface;
@Jursdotme
Jursdotme / block-grid.scss
Last active January 21, 2021 17:03
Foundation 5 style Block-Grid for Bootstrap 3 (SASS Version)
// Block Grid
// Technique adapted from Foundation 5 for Bootstrap 3.
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM)
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme)
[class*="block-grid-"] {
display: block;
margin: -($grid-gutter-width/2);
padding: 0;
@codearachnid
codearachnid / acf_repeater_dynamic_where.php
Last active December 25, 2015 02:59
Fix Advanced Custom Field dynamic key filter for repeater entries automagically. See example 5 http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
<?php
/*
* Fix Advanced Custom Field dynamic key filter for repeater entries
* @link http://www.advancedcustomfields.com/resources/how-to/how-to-query-posts-filtered-by-custom-field-values/
*/
add_filter( 'posts_where', 'acf_repeater_dynamic_where', 10, 2 );
function acf_repeater_dynamic_where( $where, &$wp_query ){
if( !empty( $wp_query->meta_query->queries ) ){
$keys = wp_list_pluck( $wp_query->meta_query->queries, "key" );
@spivurno
spivurno / gw-multi-page-navigation.php
Last active February 4, 2022 09:48
Gravity Wiz // Gravity Forms // Multi-page Form Navigation
<?php
/**
* Gravity Wiz // Gravity Forms // Multi-page Navigation
*
* Adds support for navigating between form pages by converting the page steps into page links or creating your own custom page links.
*
* @version 2.1
* @author David Smith <david@gravitywiz.com>
* @license GPL-2.0+
* @link http://gravitywiz.com/multi-page-navigation/
@jo-snips
jo-snips / events-conditional-wrappers.php
Last active December 21, 2023 12:27
The Events Calendar: Basic Conditional Wrappers
<?php
/*-----------------------------------------------------------------------------------*/
/* Conditional Logic to Detect Various Event Related Views/Pages
/*-----------------------------------------------------------------------------------*/
if( tribe_is_month() && !is_tax() ) { // Month View Page
echo 'were on the month view page';
} elseif( tribe_is_month() && is_tax() ) { // Month View Category Page