Skip to content

Instantly share code, notes, and snippets.

View andrealba's full-sized avatar
🍋
If life gives you lemons, squeeze them in her eyes.

Andrea Alba andrealba

🍋
If life gives you lemons, squeeze them in her eyes.
View GitHub Profile
@cetoh
cetoh / MyOhMyPoshTheme.omp.json
Created May 23, 2022 22:23
Oh My Posh Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#c386f1",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
@cetoh
cetoh / settings.json
Created May 23, 2022 22:22
Setting.json for Windows Terminal profiles
{
"$help": "https://aka.ms/terminal-documentation",
"$schema": "https://aka.ms/terminal-profiles-schema",
// Add custom keybindings to this array.
// To unbind a key combination from your defaults.json, set the command to "unbound".
// To learn more about keybindings, visit https://aka.ms/terminal-keybindings
"keybindings":
[
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json.
// These two lines additionally bind them to Ctrl+C and Ctrl+V.
@cetoh
cetoh / Microsoft.PowerShell_profile.ps1
Created May 23, 2022 22:21
PowerShell Profile including Oh My Posh, Terminal Icons, PSReadLine IntelliSense, and z
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
Import-Module -Name Terminal-Icons
{
"application/vnd.lotus-1-2-3": [".123"],
"text/vnd.in3d.3dml": [".3dml"],
"video/3gpp2": [".3g2"],
"video/3gpp": [".3gp"],
"application/octet-stream": [
".a",
".bin",
".bpk",
".deploy",
@rfulwell
rfulwell / a.php
Created April 19, 2019 19:06
A test file for use in comparing the behavior or `debug_backtrace` with a traditional debugger call stack.
@kagg-design
kagg-design / full_list_of_wp_globals.php
Last active October 27, 2025 07:32
Full list of WordPress global variables, extracted from WP Coding Standards
<?php
/**
* List of global WP variables.
*
* @since 0.3.0
* @since 0.11.0 Changed visibility from public to protected.
* @since 0.12.0 Renamed from `$globals` to `$wp_globals` to be more descriptive.
* @since 0.12.0 Moved from WordPress_Sniffs_Variables_GlobalVariablesSniff to WordPress_Sniff
*
* @var array
@kierzniak
kierzniak / 01-plugin.php
Last active September 22, 2022 15:23
Simple dependency injection example in WordPress plugin/theme code
<?php
/**
* Plugin bootsrap file.
*
* @author Motivast motivast.com
* @copyright 2018 - present, Motivast
*
* @license https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt GPL-2.0-or-later
*
@ahmadawais
ahmadawais / flywheel-local-xdebug-vscode.md
Last active September 30, 2025 13:13
Debug WordPress with Visual Studio Code | VSCode WordPress Debug Setup | WordPress xDebug Setup for Local by FlyWheel with VSCode | Part of the VSCode Learning Course → https://VSCode.pro

VSCode WordPress Debugging Setup: WordPress Xdebug Setup for Local by FlyWheel with VSCode


Consider supporting my work by purchasing the course this tutorial is a part of i.e. VSCode Power User

🚅 TL;DR

  • Make sure your Local by FlyWheel WordPress install is a custom install
@dvlop
dvlop / gist:fca36213ad6237891609e1e038a3bbc1
Last active December 31, 2025 16:07 — forked from allthingsdem/gist:63b3223a7d14ac1f2457
My long list of bad bots to block in htaccess, ready to copy and paste!
# Start Bad Bot Prevention
<IfModule mod_setenvif.c>
# SetEnvIfNoCase User-Agent ^$ bad_bot
SetEnvIfNoCase User-Agent "^12soso.*" bad_bot
SetEnvIfNoCase User-Agent "^192.comAgent.*" bad_bot
SetEnvIfNoCase User-Agent "^1Noonbot.*" bad_bot
SetEnvIfNoCase User-Agent "^1on1searchBot.*" bad_bot
SetEnvIfNoCase User-Agent "^3D_SEARCH.*" bad_bot
SetEnvIfNoCase User-Agent "^3DE_SEARCH2.*" bad_bot
SetEnvIfNoCase User-Agent "^3GSE.*" bad_bot
@seoagentur-hamburg
seoagentur-hamburg / .htaccess
Last active January 4, 2026 20:26
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
########################################################################