This file contains 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
#!/usr/bin/env bash | |
function ssh-keys () { | |
if ssh-add -l | grep -q "$1"; then | |
echo "$1 key is ready" | |
else | |
/usr/bin/expect -c " | |
spawn /usr/bin/ssh-add $1; | |
expect 'Enter passphrase'; | |
send $2\r; |
This file contains 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 | |
if [ $# -ne 2 ] ; then | |
echo "Usage: ssh-add-pass keyfile passfile" | |
exit 1 | |
fi | |
eval $(ssh-agent) | |
pass=$(cat $2) |
This file contains 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
<?xml version="1.0"?> | |
<ruleset name="WPS"> | |
<description>Generally-applicable sniffs for WordPress plugins.</description> | |
<!-- What to scan --> | |
<file>.</file> | |
<exclude-pattern>/vendor/</exclude-pattern> | |
<exclude-pattern>/node_modules/</exclude-pattern> | |
<!-- How to scan --> |
This file contains 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
<?xml version="1.0"?> | |
<ruleset name="WPS"> | |
<description>Generally-applicable sniffs for WordPress plugins.</description> | |
<!-- What to scan --> | |
<file>.</file> | |
<exclude-pattern>/vendor/</exclude-pattern> | |
<exclude-pattern>/node_modules/</exclude-pattern> | |
<!-- How to scan --> |
This file contains 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 | |
add_filter( 'auto_update_plugin', 'wps_auto_update_specific_plugins', 10, 2 ); | |
function wps_auto_update_specific_plugins ( $update, $item ) { | |
// Array of plugin slugs to always auto-update | |
$plugins = array ( | |
'akismet', | |
'enhanced-media-library', | |
'duplicate-page', | |
); |
This file contains 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 | |
add_action( 'wp_enqueue_scripts', 'prefix_dequeue_all_woocommerce_styles_scripts_non_shop_pages', PHP_INT_MAX ); | |
/** | |
* Disable all WooCommerce styles and scripts everywhere except WooCommerce pages. | |
*/ | |
function prefix_dequeue_all_woocommerce_styles_scripts_non_shop_pages() { | |
if ( function_exists( 'is_woocommerce' ) ) { | |
if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { | |
// Styles |
This file contains 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
<div class="widget_shopping_cart_content"> | |
<ul class="woocommerce-mini-cart cart_list product_list_widget"> | |
<li class="woocommerce-mini-cart-item mini_cart_item"> | |
<a aria-label="Remove this item" class="remove remove_from_cart_button" data-cart_item_key="abcdef12345some00hash67890uvwxyz" data-product_id="9999" data-product_sku="GRA000010" href="https://example.com?remove_item=abcdef12345some00hash67890uvwxyz&_wpnonce=f5e62f5167">×</a> <a href="https://example.com/product/some-product"><img alt="" class="attachment-woocommerce_thumbnail size-woocommerce_thumbnail" height="300" sizes="(max-width: 300px) 100vw, 300px" src="https://assets.example.com/shop/YYYY/MM/####/some-image-300x300.jpg" srcset="https://assets.example.com/shop/YYYY/MM/####/some-image-300x300.jpg 300w, https://assets.example.com/shop/YYYY/MM/####/some-image-150x150.jpg 150w, https://assets.example.com/shop/YYYY/MM/####/some-image-180x180.jpg 180w, https://assets.example.com/shop/YYYY/MM/####/some-image-600x600.jpg 600w, |
This file contains 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
Running checks 100% [===================================================================================] 0:00 / 0:00 | |
+----------------------------------------------------+---------+-----------------------------------------------------+ | |
| name | status | message | | |
+----------------------------------------------------+---------+-----------------------------------------------------+ | |
| adminer-uninstalled | success | Plugin 'adminer' is 'uninstalled' as expected. | | |
| async-google-analytics-uninstalled | success | Plugin 'async-google-analytics' is 'uninstalled' as | | |
| | | expected. | | |
| backup-uninstalled | success | Plugin 'backup' is 'uninstalled' as expected. | | |
| backup-scheduler-uninstalled | success | Plugin |
This file contains 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
wp install --skip-themes --skip-plugins \ | |
debug-bar \ | |
debug-bar-actions-and-filters-addon \ | |
debug-bar-super-globals \ | |
debug-bar-slow-actions \ | |
health-check \ | |
query-monitor \ | |
wp-crontrol \ | |
transients-manager |
This file contains 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
User-agent: mj12bot | |
crawl-delay: 10 | |
User-agent: ahrefs | |
crawl-delay: 10 |