How to clean up after debugging.
- posts, pages
- products
- orders
- users
| <?php | |
| /* | |
| * Plugin Name: Contact Form 7 Robot Trap | |
| * Description: Adds a hidden trap field to Contact Form 7. | |
| * Version: 0.6.0 | |
| * Plugin URI: https://wdmarket.com/ | |
| * Author: WD Market | |
| * Requires PHP: 7.4 | |
| * Requires at least: 6.7 |
| # CSP policy | |
| <LocationMatch "^/olm/wp-admin/"> | |
| Header always set Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self' data: blob: https://ps.w.org https://secure.gravatar.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; form-action 'self'; object-src 'none'; base-uri 'self'; frame-ancestors 'self'; report-uri /csp-report.php" | |
| </LocationMatch> |
| #!/usr/bin/env php | |
| <?php | |
| $skeletonOnly = in_array('--skeleton', $argv, true); | |
| $input = stream_get_contents(STDIN); | |
| preg_match_all('/\[(\/?)([a-zA-Z_][\w-]*)([^\]]*?)(\/?)\]/', $input, $shortcodeMatches, PREG_OFFSET_CAPTURE); | |
| function extractAttributeNames($attributeText) { | |
| preg_match_all('/([a-zA-Z_][\w:-]*)\s*=\s*(?:"[^"]*"|\'[^\']*\'|[^\s\]]+)|([a-zA-Z_][\w:-]*)/', $attributeText, $attributeMatches); |
| #!/usr/bin/env python3 | |
| import sys | |
| import re | |
| import copy | |
| import syslog | |
| import gzip | |
| import zlib | |
| import subprocess | |
| import urllib.request |
| Feladat: TVB News screenshot képeken azonosítsd és olvasd le a subtitle-ot, majd készíts hírösszefoglalót. | |
| Módszer: KIZÁRÓLAG belső látás, OCR-t/telepítést/extra szoftvert TILOS használni. Tilos zoom-olni, már eleve tökéletesek a képek. | |
| INPUT: | |
| - minden egyes képen: contact_sheet 3×40 subtitle kép, csak a videó I-frame-jeiből készült. | |
| CÉL: Minél kevesebb “próbálkozással” dolgozz: | |
| 1) Előszűrés: van contact_sheet, AZT használd elsőként arra, hogy gyorsan kiszúrd, mely frame-eken van a keresett felirat. | |
| 2) Csak ezeket a frame-eket olvasd el részletesen; minden mást azonnal SKIP-eld. |
| swagger: "2.0" | |
| info: | |
| description: | | |
| This is the contract for Vies on-the-Web endpoints. The checkVat service supports exact and approximate matching at the same time. | |
| In order to retrieve the requestIdentifier, the information about requesterMemberStateCode and requesterNumber have to be provided. | |
| version: "1.0.0" | |
| title: "Vies on-the-Web Endpoint" | |
| produces: | |
| - "application/json" | |
| host: "ec.europa.eu" |
Debugging theory: https://github.com/szepeviktor/debug-wordpress
memory_limitmax_execution_timeopcache.memory_consumptionopcache.interned_strings_buffer| while :; do ps -u $USER -o pcpu= | awk '{sum+=$1} END {printf("%4.0f\n", sum)}'; sleep 1; done |
| #!/usr/bin/env php | |
| <?php | |
| #$ composer require matomo/device-detector | |
| require __DIR__.'/vendor/autoload.php'; | |
| use DeviceDetector\DeviceDetector; | |
| use DeviceDetector\Parser\Device\AbstractDeviceParser; | |
| AbstractDeviceParser::setVersionTruncation(AbstractDeviceParser::VERSION_TRUNCATION_NONE); |