Skip to content

Instantly share code, notes, and snippets.

View loorlab's full-sized avatar
💻
💥👩‍🚀👨‍🚀💥

LOOR Lab loorlab

💻
💥👩‍🚀👨‍🚀💥
View GitHub Profile
@loorlab
loorlab / wordpress_robots_custom.php
Created July 10, 2024 17:50 — forked from amboutwe/wordpress_robots_custom.php
Filters and example code for Yoast SEO robots or WP robots.txt
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/*
* Replace Disallow with Allow Generated Robots.txt
* Credit: Unknown
* Last Tested: June 09 2020 using WordPress 5.4.1
*/
add_filter('robots_txt','custom_robots');
@loorlab
loorlab / Search my gists.md
Created July 10, 2024 14:39 — forked from santisbon/Search my gists.md
How to search gists.

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@loorlab
loorlab / minifier.php
Created August 7, 2023 02:44 — forked from abranhe/minifier.php
WordPress Minifier
<?php
/**
* W3C Fix and HTML minifier
* Nobody knows how this work, so don't touch it!!!
*
* https://wordpress.stackexchange.com/a/227896/129134
* https://stackoverflow.com/a/41148695
*/

.htaccess Snippets

NOTE: .htaccess files are for people that do not have rights to edit the main server configuration file. They are intrinsically slower and more complicated than using the main config. Please see the howto in the httpd documentation for further details.

Disclaimer: While dropping the snippet into an .htaccess file is most of the time sufficient, there are cases when certain modifications might be required. Use at your own risk.

IMPORTANT: Apache 2.4 introduces a few breaking changes, most notably in access control configuration. For more information, check the upgrading document as well as this issue.

Credits

What we are doing here is mostly collecting useful snippets from all over the interwebs (for example, a good chunk is from Apache Server Configs) into one

<?php
// Trigger Holiday Mode
add_action ('init', 'bbloomer_woocommerce_holiday_mode');
// Disable Cart, Checkout, Add Cart
function bbloomer_woocommerce_holiday_mode() {
@loorlab
loorlab / functions.php
Created March 18, 2023 04:58 — forked from mrwweb/functions.php
Example Child Theme Files
<?php
/*
Important!
Make sure to replace {my_} with your theme's unique prefix.
All future functions you write should use that same prefix.
Example: mrwnten_parent_theme_enqueue_styles()
*/
add_action( 'wp_enqueue_scripts', '{my_}parent_theme_enqueue_styles' );
@loorlab
loorlab / wp-cli-shared-hosting_WP.md
Last active September 21, 2022 02:21 — forked from mklasen/Instructions.MD
Install WP-CLI on Shared Hosting (Antagonist) + Ultimate Linux Hosting With cPanel (GoDaddy)

Download WP-CLI

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

Test to see if it works correctly

php wp-cli.phar --info

Add extra permissions

@loorlab
loorlab / Exiftool-Cheatsheet.md
Last active May 14, 2022 20:23 — forked from rjames86/My Exiftool Cheatsheet.md
Exiftool Cheatsheet

Last updated: 2022-05-14

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@loorlab
loorlab / gist:bf278a708fb6deebeeb4367a476838d6
Created March 24, 2022 01:22 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
<div class="form-group">
<label for="departamento"><strong>DEPARTAMENTO</strong></label>
<select class="form-control" id="departamento" name="departamento" required>
<option value = ""> </option>
<option value = "Amazonas">Amazonas</option>
<option value = "Antioquia">Antioquia</option>
<option value = "Arauca">Arauca</option>
<option value = "Atlántico">Atlántico</option>
<option value = "Bolívar">Bolívar</option>
<option value = "Boyacá">Boyacá</option>