Bookmarklet for easy access to edit mode on Codeacademy course exercises (where you have author / contributor rights).
Based on SCT viewer.
Drag editCA to the bookmarks bar, edit to replace the target with this code.
Bookmarklet for easy access to edit mode on Codeacademy course exercises (where you have author / contributor rights).
Based on SCT viewer.
Drag editCA to the bookmarks bar, edit to replace the target with this code.
<?php | |
/** | |
* HTTP 1.1 vs HTTP/2 test | |
* User: petskratt | |
* Date: 06/05/16 | |
* Time: 12:53 | |
*/ | |
$merchants = [ | |
'kuivtoit.ee' => '/img/Kuivtoit2.jpg', |
<?php | |
/** | |
* Parse Nimbusec JSON raport | |
* User: petskratt (peeter@zone.ee) | |
* Date: 26.08.2016 | |
* Time: 11:07 | |
* v1.0 | |
* - initial version (a quick hack and proof of idea) | |
*/ |
<?php | |
define( 'PROD_HOST', '' ); | |
define( 'CURRENT_HOST', $_SERVER['SERVER_NAME'] ); | |
define( 'CURRENT_IP', $_SERVER['SERVER_ADDR'] ); | |
define( 'WP_DEBUG', false ) ; | |
define( 'DB_CHARSET', 'utf8' ); | |
define( 'DB_COLLATE', '' ); | |
$table_prefix = 'wp_'; |
<?php | |
// dump database - either using WordPress config from same directory or locally configured parameters | |
// ... or Magento's local.xml | |
// v 1.3 (2015-03-18) Peeter Marvet, http://tehnokratt.net | |
// v 1.4 (2017-11-14) added autorenamer | |
if ( basename( __FILE__, '.php' ) === 'humpty-dump' ) { |
<?php | |
/* | |
Plugin Name: Zone Updateall | |
Plugin URI: https://gist.github.com/petskratt/1d3e29fb4e6224e1a73b2422c8363044 | |
Description: Allow automatic WP and plugin updates. No fancy settings, just does the job. | |
Author: Peeter Marvet | |
Version: 0.1 | |
Author URI: https://www.zone.ee/ | |
*/ |
<?php | |
/* | |
Plugin Name: Zone Cachebuster | |
Plugin URI: https://gist.github.com/petskratt/3acd7166297ff4451a606115b49ad22c | |
Description: Replace JS and CSS version parameters with hash - for obfuscation or quick cachebusting. | |
Author: Peeter Marvet | |
Version: 0.1 | |
Author URI: https://www.zone.ee/ | |
*/ |
-- created to find tables with missing indexes on a WordPress install | |
SET @db = 'some_database'; | |
SELECT | |
tbl.table_name, | |
idx.indexes | |
FROM | |
information_schema.tables AS tbl | |
LEFT JOIN( | |
SELECT table_name, |
# 6G FIREWALL/BLACKLIST | |
# @ https://perishablepress.com/6g/ | |
# 6G:[QUERY STRINGS] | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{QUERY_STRING} (eval\() [NC,OR] | |
RewriteCond %{QUERY_STRING} (127\.0\.0\.1) [NC,OR] | |
RewriteCond %{QUERY_STRING} ([a-z0-9]{2000}) [NC,OR] | |
RewriteCond %{QUERY_STRING} (javascript:)(.*)(;) [NC,OR] |
# robots.txt for WordPress / v1.01 2020-01-27 / Peeter Marvet | |
# v1.01 - changed Crawl-delay to max allowed by Yandex e.g 2.0 | |
# | |
# Uncomment and specify hostname (sitemap can be on different domain): | |
#Sitemap: https://example.com/sitemap_index.xml | |
# | |
# User-agents are not cumulative, e.g if a bot finds matching group * is ignored. | |
User-agent: * | |
Crawl-delay: 2.0 | |
# All requests with parameters (search, WooCommerce filters etc): |