Skip to content

Instantly share code, notes, and snippets.

View AdamNatad's full-sized avatar
💙
Blah blah blah

Adam Natad AdamNatad

💙
Blah blah blah
View GitHub Profile
@AdamNatad
AdamNatad / wordpress-disable-distraction-free.php
Last active December 12, 2022 04:35
Wordpress Disable full-height editor and distraction-free functionality
<?php
/**
* Disable Distraction Free Writing Mode and the "Auto Expanding"
* height of the editor based on a list of post types.
*
* @return void
*/
function my_deregister_editor_expand($val, $post_type)
{
@AdamNatad
AdamNatad / start_ngrok_telegram_bot.sh
Created June 20, 2022 17:42
A bash script to start Ngrok in background, and send ngrok URL to a Telegram Bot automatically, copying the remote URL to clipboard
#!/usr/bin/env bash
# Start NGROK in background
echo "⚡️ Starting ngrok"
ngrok http 8080 > /dev/null &
# Wait for ngrok to be available
while ! nc -z localhost 4040; do
sleep 1/5 # wait Ngrok to be available
done
@AdamNatad
AdamNatad / start_ngrok_update_cloudflare.sh
Created June 20, 2022 17:41
Script to start ngrok, copy the generated URL to clipboard and update a remote Cloudflare worker with the public ngrok url
#!/usr/bin/env bash
echo "=========== START LOCAL HTTP / HTTPS TUNNEL AND UPDATE YOUR REMOTE DEV DOMAIN TO POINT IT ==========="
printf "\n"
# Start NGROK in background
echo "⚡️ Starting ngrok"
ngrok http 8080 > /dev/null &
# Wait for ngrok to be available
while ! nc -z localhost 4040; do
@AdamNatad
AdamNatad / woocommerce-change-spinner-and-overlay-style.css
Last active February 20, 2022 17:12
WooCommerce Change Spinner and Overlay Style CSS
/* Checkout Loader */
.blockUI.blockOverlay {
background-image:url('https://woocommerce-722142-2403447.cloudwaysapps.com/cac_uploads/2022/02/339-f.gif') !important;
background-position: center 50% !important;
background-repeat: no-repeat !important;
position: fixed !important;
background-size: 96px 96px !important;
}
.processing .blockOverlay {
background-image:url('https://woocommerce-722142-2403447.cloudwaysapps.com/cac_uploads/2022/02/339-f.gif') !important;