This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server'; | |
export const config = { | |
matcher: ['/'], | |
}; | |
const THRESHOLD = 0.5; | |
const COOKIE_NAME = 'tm_var'; | |
export function middleware(req) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextResponse } from 'next/server'; | |
export const config = { | |
matcher: ['/'], | |
}; | |
const THRESHOLD = 0.5; | |
const COOKIE_NAME = 'tm_var'; | |
export function middleware(req) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Recaptcha HTML: <div class="g-recaptcha" data-sitekey="{{ site_key }}" data-theme="dark" id="recaptcha"></div> | |
// MapKit HTML: <div id="map" class="h-full"></div> | |
// (also requires installation of mapkit.js and recaptcha.js scripts) | |
var recpatcha = document.getElementById('recaptcha') | |
var mapKitColorMode = "light"; | |
if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) { | |
recpatcha.setAttribute('data-theme', 'dark'); | |
mapKitColorMode = "dark" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fix for FOUC : | |
**At the top of your HTML:** | |
<!doctype html> | |
<html> | |
<head> | |
<style>html{visibility: hidden;opacity:0;}</style> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
analytics | |
bug | |
ui/ux problem | |
enhancement | |
hold | |
duplicate | |
enhancement | |
help wanted | |
need client feedback | |
need client info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
use EasyCorp\Bundle\EasyAdminBundle\Controller\AdminController; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Google_Client; | |
use Google_Service_AnalyticsReporting; | |
class AdminDashboardController extends AdminController |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/php | |
<?php | |
echo "Running tests.. "; | |
exec('bin/phpunit', $output, $returnCode); | |
if ($returnCode !== 0) { | |
// Show full output | |
echo PHP_EOL . implode($output, PHP_EOL) . PHP_EOL; | |
echo "Aborting commit.." . PHP_EOL; | |
exit(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{# | |
Relies mostly on a meta array containing appropriate values. | |
site_name is a parameter set as a Twig Global | |
default_share_image is a fallback parameter set as a Twig Global | |
#} | |
<meta charset="UTF-8"> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="robots" content="index, follow" /> | |
<meta property="og:type" content="website" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file means nothing. It's just here to give the Gist a name I can understand. | |
# This configuration requires the KNP Snappy Bundle [https://github.com/KnpLabs/KnpSnappyBundle] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"require": { | |
"luxifer/doctrine-functions": "~1.4", | |
} | |
} |
NewerOlder