Skip to content

Instantly share code, notes, and snippets.

#
# robots.txt
#
# This file is to prevent the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these "robots" where not to go on your site,
# you save bandwidth and server resources.
#
# This file will be ignored unless it is at the root of your host:
# Used: http://example.com/robots.txt
@careydayrit
careydayrit / wp-plugin-management.php
Last active April 27, 2021 02:40
Deactivate plugin without logging into wordpress
<?php
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
// TODO: read the tabe prefix set on wp_config.php
// replace the prefix based on wp-config.php
$wp_prefix = 'wp_';
// For sites not on pantheon just replace the $_ENV with the appropriate connection information
@careydayrit
careydayrit / config
Created November 17, 2020 18:34
Fedora ssh configuration file
# add this line to ~/.ssh/config for the updated version of Fedora
Host *
PubkeyAcceptedKeyTypes +rsa-sha2-256,rsa-sha2-512
@careydayrit
careydayrit / settings.php
Created November 11, 2020 17:58
Redirect
<?php
if (($_SERVER['REQUEST_URI'] == '/2016annualreport') && (php_sapi_name() != "cli")) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: https://'. $_SERVER['HTTP_HOST'] . '/2016annualreport/index.html');
// Name transaction "redirect" in New Relic for improved reporting (optional).
if (extension_loaded('newrelic')) {
newrelic_name_transaction("redirect");
@careydayrit
careydayrit / plugin_management.php
Last active November 11, 2020 12:42
Disable plugin without login to Admin Panel
<?php
header( 'Cache-Control: no-cache, must-revalidate, max-age=0' );
// TODO: read the tabe prefix set on wp_config.php
// replace the prefix based on wp-config.php
$wp_prefix = 'wp_';
// For sites not on pantheon just replace the $_ENV with the appropriate connection information
@careydayrit
careydayrit / confirm_link.php
Last active November 9, 2020 13:24
Wordpress Password Confirm Link
@careydayrit
careydayrit / Status
Last active June 15, 2020 14:42
arcticstock-v3
Views
Views status: Views is enabled.
Rendered output caching: The following Views are not caching rendered output: photography, confirm_message_product_display, featured_photo, footage, tags, photos_of_contributor, user_photos, featured_video, videos_of_contributor, latest_videos, user_videos, purchased_by_user, contributor_sales, categories, charts_demo, collection_products, commerce_addressbook, commerce_addressbook_defaults, commerce_backoffice_product_variations, commerce_discount_overview, commerce_gc_giftcards, commerce_gc_giftcard_transactions, commerce_gc_user_giftcards, commerce_message_messages, commerce_reports_customers, commerce_reports_customer_map, commerce_reports_customer_statistics, commerce_reports_payment_methods, commerce_reports_products, commerce_reports_sales, commerce_reports_sales_overview, commerce_reports_taxes, coupons, display_products, media_default, message, order_coupon_list, product_individual_report, shopping_cart
Rendered output should be cached for as long as possible (
@careydayrit
careydayrit / sample.sh
Created April 9, 2020 14:16
World continents html map
# create uploads folder
username@:machine:wp-content/uploads/$ mkdir worldcontinentshtmlmap/static/cache
# if this not work you need to create folders under worldcontinentshtmlmap
# go to the wp-content/plugins/worldcontinentshtmlmap/static, be sure remove the cache folder first
username@:machine:wp-content/plugins/worldcontinentshtmlmap/static$ ln -s ../../uploads/worldcontinentshtmlmap/static/cache ./cache
@careydayrit
careydayrit / info.txt
Created March 10, 2020 16:19
info for mesource.com
first time
curl -o /dev/null -w "TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://www.medsource.com
TTFB: 1.179 Total time: 1.231
2nd time
curl -o /dev/null -w "TTFB: %{time_starttransfer} Total time: %{time_total} \n" https://www.medsource.com
TTFB: 0.888 Total time: 0.939
@careydayrit
careydayrit / cmds
Created February 25, 2020 19:46
Correct comands
sudo rm /usr/local/bin/terminus
sudo ln -s /home/msasin20/vendor/pantheon-systems/terminus/bin/terminus /usr/local/bin/terminus