Skip to content

Instantly share code, notes, and snippets.

@radiuscz
radiuscz / SQL
Created February 14, 2018 21:54
Intranet Koha: TOP 15 nejaktivnějších čtenářů
select count(*) as Pocet, ctenar as 'Čtenář', branches.branchname as 'Oddělení', itemtypes.description as 'Typ jednotky'
from (
select issuedate, itemnumber, borrowernumber, concat(firstname, " ", surname) as ctenar, old_issues.branchcode
from old_issues
left join borrowers USING(borrowernumber)
UNION
select issuedate, itemnumber, borrowernumber, concat(firstname, " ", surname) as ctenar, issues.branchcode
from issues
left join borrowers USING(borrowernumber)
) as T
@radiuscz
radiuscz / antibot.sh
Last active November 1, 2024 09:43
VuFind - přetížení roboty Semrush, Ahrefs, BLEX
#!/bin/bash
sed -i 's/# Uncomment the following lines/BrowserMatchNoCase SemrushBot|AhrefsBot|BLEXBot|AspiegelBot|SEOkicks|PetalBot|YandexBot|bingbot|DotBot|MJ12bot|Seekport|Adsbot|Amazonbot|DataForSeoBot|seoscanners|uni-leipzig|Turnitin|Bytespider|Barkrowler|serpstatbot|ImagesiftBot|ClaudeBot bad_bot|facebookexternalhit|FriendlyCrawler|GPTBot|meta-externalagent|AwarioBot\n Order Deny,Allow\n Deny from env=bad_bot\n\n # Uncomment the following lines/' /usr/local/vufind2/local-*/httpd-vufind.conf