This file contains hidden or 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
| #!/bin/bash | |
| chars=( {a..z} {A..Z} {0..9} ) | |
| function rand_string { | |
| local c=$1 ret= | |
| while((c--)); do | |
| ret+=${chars[$((RANDOM%${#chars[@]}))]} | |
| done | |
| printf '%s\n' "$ret" |
This file contains hidden or 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
| #Apache | |
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| # Ensure all URLs have a trailing slash. | |
| RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{REQUEST_METHOD} GET | |
| RewriteCond %{REQUEST_URI} !(.*)/$ | |
| RewriteCond %{REQUEST_FILENAME} !\.(gif|jpg|png|jpeg|css|xml|txt|js|php|scss|webp|mp3|avi|wav|mp4|mov|pdf|html|htm|xst)$ [NC] | |
| RewriteRule ^(.*)$ https://domain.com/$1/ [L,R=301] |
This file contains hidden or 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
| jQuery(document).ready(function($) { | |
| 'use strict'; | |
| function setupIcons() { | |
| const lightSchemeIcon = document.querySelector('link#light-scheme-icon'); | |
| const darkSchemeIcon = document.querySelector('link#dark-scheme-icon'); | |
| function setLight() { | |
| document.head.append(lightSchemeIcon); | |
| darkSchemeIcon.remove(); |
This file contains hidden or 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 | |
| // Remove Post Meta Boxes from WP Editor | |
| function remove_my_post_metaboxes() { | |
| remove_meta_box( ‘authordiv’,’post’,’normal’ ); // Author Metabox | |
| remove_meta_box( ‘commentstatusdiv’,’post’,’normal’ ); // Comments Status Metabox | |
| remove_meta_box( ‘commentsdiv’,’post’,’normal’ ); // Comments Metabox | |
| remove_meta_box( ‘postcustom’,’post’,’normal’ ); // Custom Fields Metabox | |
| remove_meta_box( ‘postexcerpt’,’post’,’normal’ ); // Excerpt Metabox | |
| remove_meta_box( ‘revisionsdiv’,’post’,’normal’ ); // Revisions Metabox |
This file contains hidden or 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 | |
| // Hide Accelerated Mobile Pages Admin Menus | |
| function plt_hide_accelerated_mobile_pages_menus() { | |
| //Hide "AMP". | |
| remove_menu_page('amp_options'); | |
| //Hide "AMP → Setup". | |
| remove_submenu_page('amp_options', 'amp_options&tab=1'); | |
| //Hide "AMP → Settings". | |
| remove_submenu_page('amp_options', 'amp_options&tab=2'); |
This file contains hidden or 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
| /** | |
| * Removes comments from the left hand navigation in the admin. | |
| */ | |
| add_action( 'admin_menu', 'wp_remove_menus' ); | |
| function wp_remove_menus() { | |
| global $menu; | |
| global $submenu; | |
| remove_menu_page( 'edit-comments.php' ); | |
| echo ''; | |
| } |
This file contains hidden or 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 | |
| //Remove Gutenberg Block Library CSS from loading on the frontend | |
| function smartwp_remove_wp_block_library_css(){ | |
| wp_dequeue_style( 'wp-block-library' ); | |
| wp_dequeue_style( 'wp-block-library-theme' ); | |
| wp_dequeue_style( 'wc-blocks-style' ); // Remove WooCommerce block CSS | |
| wp_dequeue_style( 'storefront-gutenberg-blocks' ); // Storefront theme | |
| } | |
| add_action( 'wp_enqueue_scripts', 'smartwp_remove_wp_block_library_css', 100 ); |
This file contains hidden or 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
| Windows Registry Editor Version 5.00 | |
| ; Created by: Shawn Brink | |
| ; Created on: June 27th 2016 | |
| ; Updated on: May 7th 2019 | |
| ; Tutorial: https://www.tenforums.com/tutorials/14312-restore-windows-photo-viewer-windows-10-a.html | |
| [HKEY_CURRENT_USER\SOFTWARE\Classes\.bmp] |
This file contains hidden or 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
| Windows Registry Editor Version 5.00 | |
| ; Created by: Shawn Brink | |
| ; Created on: June 27th 2016 | |
| ; Updated on: May 7th 2019 | |
| ; Tutorial: https://www.tenforums.com/tutorials/14312-restore-windows-photo-viewer-windows-10-a.html | |
| [HKEY_CURRENT_USER\SOFTWARE\Classes\.bmp] |
This file contains hidden or 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 | |
| // Remove subscribe to calendar dropdown from main calendar page | |
| add_filter( 'tribe_template_html:events/v2/components/subscribe-links/list', '__return_false' ); |