Skip to content

Instantly share code, notes, and snippets.

View Horttcore's full-sized avatar
💭
Available

Ralf Hortt Horttcore

💭
Available
View GitHub Profile
@CoachBirgit
CoachBirgit / create-wordpress-with-valet.sh
Last active October 31, 2023 16:51
Bash script: Use WP-CLI on Laravel/Valet to download, install and configure WordPress like a breeze.
#! /bin/bash
# Author: Birgit Olzem aka @CoachBirgit
# Version: 1.0
# Created on: January 19th 2022
# Requires WP-CLI, cURL, wget
# credits for the origin idea to Jeremy Herve: https://jeremy.hu/dev-environment-laravel-valet-wp-cli/
### How to use
<?php
/**
* prueft, ob der Zugriff von einem Page Analyzer, wie Google PageSPeed Insights,
* aus erfolgt.
*
* Da wir keinen Einfluss auf den Brwoser-Cache der Google Analytics JS haben,
* spielen wir kein Google Analytics aus, wenn ein Page Analyzer auf die Seite
* zugreift. Das verschönert unsere Werte ;-)
*
* @param string $ua User-Agent
@QWp6t
QWp6t / BedrockMultisiteValetDriver.php
Last active March 6, 2024 11:28
Fix Laravel Valet when using WordPress subdirectory multisite + Bedrock
<?php
namespace Valet\Drivers\Custom;
class BedrockMultisiteValetDriver extends \Valet\Drivers\Specific\BedrockValetDriver
{
/**
* Determine if the incoming request is for a static file.
*
* @return string|false
@zottto
zottto / .htaccess
Last active December 7, 2018 11:20
Mehr Sicherheit in WordPress durch .htaccess
# Beispiel-Codeschnipsel für die WordPress-htaccess-Datei
# https://www.wp-sicherheit.info
# Marc Nilius, info@wp-sicherheit.info
# Mit Material von Zodiac1978, siehe auch https://gist.github.com/Zodiac1978/d25a8f3aebba7cd1c01c
#
# Diese Codeschnipsel gehören in die .htaccess-Datei im Hauptverzeichnis von WordPress
# Jeder einzelne Bestandteil kann einzeln kopiert und genutzt werden.
# Bitte die Verwendungshinweise (Kommentare) an jedem Schnipsel beachten
@jakebellacera
jakebellacera / ICS.php
Last active April 19, 2024 09:06
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*