Skip to content

Instantly share code, notes, and snippets.

Avatar

Peeter Marvet petskratt

View GitHub Profile
@petskratt
petskratt / .gitignore
Last active Jan 22, 2020
Group file change times by inode ctime
View .gitignore
.Idea
.DS_Store
@petskratt
petskratt / robots.txt
Last active Jan 27, 2020
WordPress robots.txt
View robots.txt
# 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):
@petskratt
petskratt / robots.txt
Last active Jun 26, 2020
Magento robots.txt
View robots.txt
# 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!
@petskratt
petskratt / xkcd_pwd_gen.php
Last active Sep 1, 2020
Generate xkcd style password using most common 1000 Estonian words (Ansip and Savisaar excluded)
View xkcd_pwd_gen.php
<?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() {
You can’t perform that action at this time.