From d537b626dfb22d67ff7f38e59975017efd7d840c Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Fri, 1 Mar 2024 12:39:19 -0500 Subject: [PATCH] add some scripts --- bin/bin/logcount | 6 ++++++ bin/bin/pbm | 12 ++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 bin/bin/logcount create mode 100755 bin/bin/pbm diff --git a/bin/bin/logcount b/bin/bin/logcount new file mode 100755 index 0000000..654fcbd --- /dev/null +++ b/bin/bin/logcount @@ -0,0 +1,6 @@ +#!/bin/sh + +zcat -f /var/log/nginx/other_vhosts_access.log* |\ +grep -viE '(bing|googlebot|baidu|semrush|yandex|ahrefsbot|linkcheck|yisou|mail\.ru|dotbot|seznambot|mj12bot|applebot|coccoc|webeaver|commoncrawl|exabot|7ooo\.ru|changedetection|brandwatch|360spider|gowikibot|ryte\.com|semanticscholar|crawler|alignab|daum\.net|Apache-HttpClient|wp-cron\.php|xmlrpc\.php|wp-login\.php|uptimerobot|/wp-admin/|python-requests|robots\.txt|feedparser|siteimprove|zoominfobot)' |\ +grep -i "$1" + diff --git a/bin/bin/pbm b/bin/bin/pbm new file mode 100755 index 0000000..0a7a2e8 --- /dev/null +++ b/bin/bin/pbm @@ -0,0 +1,12 @@ +#!/bin/sh + +pbm() { + curl -s https://pinballmap.com/api/v1/locations/$1/machine_details.json\?machines_only=1 \ + | jq -r '.machines | .[]' \ + > ~/public_html/pin/$2.txt +} + +pbm 9699 coinslot +pbm 13280 rightbrain + +