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 | |
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_'; |
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.
# robots.txt for Magento 1.9.x / v1.6 2018-08-19 / Peeter Marvet | |
# (original version from 2015, edited in 2017 to add filter query parameter disallow samples + some wildcards, | |
# edited in 2018 to add query params blocking to Yandex as named User-agent does not read *) | |
# based on: | |
# http://inchoo.net/ecommerce/ultimate-magento-robots-txt-file-examples/ | |
# http://www.byte.nl/blog/magento-robots-txt/ | |
# https://astrio.net/blog/optimize-robots-txt-for-magento/ | |
# | |
# comment and clone at https://gist.github.com/petskratt/016c9dbf159a81b9d6aa | |
# Keep in mind that by standard robots.txt should NOT contain empty lines, except between UA blocks! |
<?php | |
/* | |
* Generate xkcd style password using most common 1000 Estonian words (Ansip and Savisaar excluded) | |
* based on http://www.eki.ee/tarkvara/wordlist/soned2013_top1000.txt (removed names, countries, words with umlauts) | |
* | |
* http://xkcd.com/936/ | |
*/ | |
function xkcd_password_generator() { |
<?php | |
/** | |
* HTTP 1.1 vs HTTP/2 test | |
* User: petskratt | |
* Date: 06/05/16 | |
* Time: 12:53 | |
*/ | |
$merchants = [ | |
'kuivtoit.ee' => '/img/Kuivtoit2.jpg', |
.Idea | |
.DS_Store |
<?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) | |
*/ |
# 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] |
<?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' ) { |
#!/usr/bin/env bash | |
# for debug output, uncomment: | |
#set -x | |
function help { | |
echo "WordPress cleanup -v 0.5 2018-06-26 / peeter@zone.ee | |
Usage: |