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 | |
/** | |
* A really dumb tool for ad-hoc PHP request logging - mostly useful to find malicious POST / cookie / etc payloads | |
* | |
* prepend with php.ini or .user.ini to cover all requests: | |
* auto_prepend_file = /[full-path-to-location]/dumb_sec.php | |
* | |
* @author : Peeter Marvet (peeter@zone.ee) | |
* @version 0.3 | |
* @license https://www.gnu.org/licenses/gpl-3.0.html GPL |
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 | |
# peeter.marvet@vaimo.com / 2022-11-01 ("Klytus, I'm bored. What plaything can you offer me today?") | |
# Scan images deployed to a K8S cluster for OpenSSL versions | |
# | |
# prerequisites: | |
# - kubectl | |
# - authenticated and authorised to access all namespaces of a cluster | |
# - Trivy installed https://aquasecurity.github.io/trivy/v0.34/getting-started/installation/ | |
# - Trivy has access to your presumably private registries https://aquasecurity.github.io/trivy/v0.34/docs/advanced/private-registries/gcr/ | |
# |
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
# robots.txt for Magento 1.9.x & 2.x / v1.7 2023-01-30 / peeter.marvet@vaimo.com | |
# - original version from 2015 for 1.9.x, but these rules are OK for M2 as well | |
# - 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 * | |
# - edited in 2023 to remove unneeded stuff (license.txt, crawl-delay) and make all rules use */ prefix | |
# based on: | |
# https://inchoo.net/ecommerce/ultimate-magento-robots-txt-file-examples/ | |
# https://www.hypernode.com/nl/blog/magento-robots-txt/ | |
# https://astrio.net/blog/optimize-robots-txt-for-magento/ | |
# |
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 | |
/* | |
* 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() { |
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 | |
# should go into .profile | |
# | |
# single timing: | |
# curltime https://example.com/ | |
# | |
# with unique query argument to bypass cache: | |
# curltime https://example.com/?cachebuster=202304271033 | |
# | |
# loop with increasing counter: |
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 | |
# should go into .profile | |
# from zone.eu shared server conf, with changes for MacOS | |
alias ..='cd ..' | |
alias ...='cd ../..' | |
alias ....='cd ../../..' | |
alias cd..='cd ..' | |
alias cd...='cd ../..' | |
alias cd....='cd ../../..' |
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
# Display current K8S resource usage for a namespace (either first argument or current) | |
# Add to your ~/.profile, copy-paste results for analysis to https://docs.google.com/spreadsheets/d/1v___k9gYo4RI4wWIluJcdqOVHCFEccLQMOCGxvrZGtk/edit?usp=sharing | |
# peeter.marvet@vaimo.com / 2023-07-18 | |
function resource_capacity() { | |
if [ -z "$1" ] | |
then | |
namespace=$(kubectl config view --minify -o jsonpath='{..namespace}') | |
else |
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 | |
# for debug output, uncomment: | |
#set -x | |
function help { | |
echo "WordPress cleanup -v 0.5 2018-06-26 / peeter@zone.ee | |
Usage: |
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
.Idea | |
.DS_Store |
OlderNewer