Skip to content

Instantly share code, notes, and snippets.

@thezoggy
thezoggy / sample.log
Last active April 6, 2018 04:12
sample apache2 for badbots
localhost:80 123.30.175.175 - - [19/Sep/2017:01:35:14 +0000] "GET /robots.txt HTTP/1.1" 200 271 "-" "Mozilla/5.0 (compatible; coccocbot-web/1.0; +http://help.coccoc.com/searchengine)"
localhost:80 64.62.252.162 - - [11/Oct/2017:09:47:52 +0000] "GET /robots.txt HTTP/1.1" 200 308 "-" "BUbiNG (+http://law.di.unimi.it/BUbiNG.html)"
localhost:80 23.20.86.177 - - [12/Oct/2017:19:36:15 +0000] "GET /robots.txt HTTP/1.0" 200 271 "-" "CCBot/2.0 (http://commoncrawl.org/faq/)"
localhost:80 151.80.31.151 - - [18/Oct/2017:06:40:14 +0000] "GET /robots.txt HTTP/1.1" 200 252 "-" "Mozilla/5.0 (compatible; AhrefsBot/5.2; +http://ahrefs.com/robot/)"
localhost:80 34.228.23.62 - - [18/Oct/2017:11:02:04 +0000] "GET /robots.txt HTTP/1.1" 200 308 "-" "Mozilla/5.0 (compatible; linkdexbot/2.0; +http://www.linkdex.com/bots/)"
localhost:80 34.192.116.178 - - [18/Oct/2017:14:17:02 +0000] "GET /robots.txt HTTP/1.1" 200 308 "-" "Mozilla/5.0 (compatible; SMTBot/1.0; +http://www.similartech.com/smtbot)"
localhost:80 144.202.193.40 - - [19/Oct

query for scene passthrus using 'sxxexx' only (subquery excludes shows that have scene mappings that dont use 'sxxexx' which would result in getting absolute numbers) which if these series are in sonarr and set to anime.. would result in bad searches as absolute numbers dont exist...

  • note that this does not cover the scenario where the scene season itself could dictate an absolute start.. thus these series could be fine
select e.id, e.main_name, o.name as Origin,d.name AS Destination, p.type from passthrus AS p 
join elements AS e on e.id=p.element_id and e.parent = 0 
join locations o on (o.id=p.origin_id) 
join locations d on (d.id=p.destination_id) 
@thezoggy
thezoggy / tvmaze.tcl
Last active October 5, 2015 18:07 — forked from zeebinz/tvmaze.tcl
#######################
## tvmaze.tcl
###############################################################################
# TVMaze.com eggdrop script for those without package json or http, otherwise
# this is one much better: http://forum.egghelp.org/viewtopic.php?t=20045
# get show info: !tvm show
# with summary: !tvm show -s
# get ep info: !tvm show 1x01 or !tvm show 2015-10-03
###############################################################################
import sys
from optparse import OptionParser
import os
# code from init to set WIN32
WIN32 = False
if os.name == 'nt':
WIN32 = True
try:
import ctypes
@thezoggy
thezoggy / gist:3829338
Created October 3, 2012 19:41
Wake-On-LAN
import socket
import struct
def wakeOnLan(ethernet_address):
"""
Send magic-packet to destination computer MAC address
MAC address must be contain : seperators, 1F:2F:3F:4F:5F:6F
TODO: macrex = re.compile(r'^([0-9a-fA-F]{2}([:-]|$)){6}$')
TODO: support SecureON