Skip to content

Instantly share code, notes, and snippets.

View miigotu's full-sized avatar
:octocat:

miigotu miigotu

:octocat:
View GitHub Profile
@miigotu
miigotu / test_ssl.sh
Last active August 29, 2015 14:20
Check for SSL errors and correct dependancies.
#!/bin/bash
#Install our required modules, with the correct versions.
/usr/bin/env pip2.7 install -q -U 'cheetah>=2.1.0' 'pyopenssl<=0.13.1' 'requests<=2.6.0' 'ndg-httpsclient' 'pyasn1'
#Test out the environment, and try to access a site on shared hosting needing SNI
/usr/bin/env python2 <<PYDOC
import sys
@miigotu
miigotu / ssl_checkup.py
Last active August 29, 2015 14:20
Check for SNI capability over SSL
#From inside a virtualenv:
#!bin/python2.7
#For system wide site-packages, comment the previous and uncomment below:
##!/usr/bin/env python2.7
import sys
debug = False
info_strings = []
@miigotu
miigotu / statuscolor-0.4.pl
Last active August 29, 2015 14:22
Color nicks, text, and mode symbol based on status in hexchat/xchat
# Name: statuscolor-0.4.pl
# Version: 0.4
# Author: LifeIsPain < idontlikespam (at) orvp [dot] net >
# Date: 2008-06-02
# Description: Change the color of usernames, text, and mode symbol in channel text based on channels status
# (op, voice, etc)
# Modified: Miigotu , miigotu (at) gmail [dot] com >
# Version Histroy
# 0.1 2008-01-13 The Birth!
@miigotu
miigotu / remove_sub_rlsgroup
Last active August 29, 2015 14:23
Chop non release groups from tv episode release_name in DB
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[rartv]', '') WHERE release_name LIKE '%[rartv]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[rarbg]', '') WHERE release_name LIKE '%[rarbg]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[eztv]', '') WHERE release_name LIKE '%[eztv]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[ettv]', '') WHERE release_name LIKE '%[ettv]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[vtv]', '') WHERE release_name LIKE '%[vtv]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[GloDLS]', '') WHERE release_name LIKE '%[GloDLS]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[silv4]', '') WHERE release_name LIKE '%[silv4]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[Seedbox]', '') WHERE release_name LIKE '%[Seedbox]';
UPDATE tv_episodes SET release_name = REPLACE(release_name, '[AndroidTwoU]', '') WHERE release_name LIKE '%[AndroidTwoU]';
UPDATE tv_episo
#!/usr/bin/env python2
import sqlite3
WANTED = 3
SKIPPED = 5
IGNORED = 7
statusStrings = {
WANTED: "Wanted",
2015-07-26 05:51:44 ERROR MainThread :: FAKE ERROR: FAKE EXCEPTION
2015-07-17 04:38:51 DEBUG MainThread :: No scene exceptions update needed
2015-07-17 04:38:51 WARNING MainThread :: Check scene exceptions update failed. Unable to update from: http://http://sickragetv.github.io/sr_tvrage_scene_exceptions/exceptions.txt
2015-07-17 04:38:51 WARNING MainThread :: Connection error to http://http://sickragetv.github.io/sr_tvrage_scene_exceptions/exceptions.txt. Error: ('Connection aborted.', gaierror(-2, 'Name or service not known'))
2015-07-17 04:38:51 INFO MainThread :: Checking for scene exception updates for TVRage
2015-07-17 04:38:50 DEBUG MainThread :: No scene exceptions update needed
2015-07-17 04:38:50 WARNING MainThread :: Check scene exceptions update failed. Unable to update from: http://http://sickragetv.github.io/sr_tvrage_scene_exceptions/exceptions.txt
2015-07-17 04:38:50 WARNING MainThread :: Connection error to http://http://sickragetv.github.io/sr_tvrage_scene_exceptions/excepti
2015-07-26 05:53:00 ERROR MainThread :: FAKE ERROR: FAKE EXCEPTION
GithubException: 422 {u'documentation_url': u'https://developer.github.com/v3/issues/#list-issues', u'message': u'Validation Failed', u'errors': [{u'field': u'state', u'code': u'invalid', u'resource': u'Issue', u'value': u'open|closed'}]}
raise self.__createException(status, responseHeaders, output)
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 177, in __check
return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 169, in requestJsonAndCheck
parameters=self.__nextParams
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 158, in _fetchNextPage
newElements = self._fetchNextPage()
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 60, in _grow
2015-07-26 05:53:05 ERROR MainThread :: FAKE ERROR: FAKE EXCEPTION
GithubException: 422 {u'documentation_url': u'https://developer.github.com/v3/issues/#list-issues', u'message': u'Validation Failed', u'errors': [{u'field': u'state', u'code': u'invalid', u'resource': u'Issue', u'value': u'open|closed'}]}
raise self.__createException(status, responseHeaders, output)
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 177, in __check
return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 169, in requestJsonAndCheck
parameters=self.__nextParams
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 158, in _fetchNextPage
newElements = self._fetchNextPage()
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 60, in _grow
2015-07-26 06:04:15 ERROR MainThread :: FAKE ERROR: FAKE EXCEPTION
GithubException: 422 {u'documentation_url': u'https://developer.github.com/v3/issues/#list-issues', u'message': u'Validation Failed', u'errors': [{u'field': u'state', u'code': u'invalid', u'resource': u'Issue', u'value': u'open|closed'}]}
raise self.__createException(status, responseHeaders, output)
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 177, in __check
return self.__check(*self.requestJson(verb, url, parameters, headers, input, cnx))
File "/home/dusted/Projects/SickRage/lib/github/Requester.py", line 169, in requestJsonAndCheck
parameters=self.__nextParams
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 158, in _fetchNextPage
newElements = self._fetchNextPage()
File "/home/dusted/Projects/SickRage/lib/github/PaginatedList.py", line 60, in _grow
2015-07-27 16:52:07 ERROR Thread-16 :: Failed doing webui callback: Traceback (most recent call last):
2015-07-27 16:51:55 INFO SEARCHQUEUE-DAILY-SEARCH :: No needed episodes found
2015-07-27 16:51:53 DEBUG SEARCHQUEUE-DAILY-SEARCH :: Seeing if we need anything from Hannibal
2015-07-27 16:51:53 DEBUG SEARCHQUEUE-DAILY-SEARCH :: Seeing if we need anything from Penn & Teller: Fool Us
2015-07-27 16:51:53 DEBUG SEARCHQUEUE-DAILY-SEARCH :: Seeing if we need anything from Once Upon a Time (2011)
2015-07-27 16:51:53 DEBUG SEARCHQUEUE-DAILY-SEARCH :: Seeing if we need anything from Game of Thrones
2015-07-27 16:51:53 INFO SEARCHQUEUE-DAILY-SEARCH :: Beginning daily search for new episodes
2015-07-27 16:51:52 DEBUG CHECKVERSION :: cur_commit = 8e2939427d62807b7df935cd122a1dcd0ac6a80e, newest_commit = 8e2939427d62807b7df935cd122a1dcd0ac6a80e, num_commits_behind = 0, num_commits_ahead = 0
2015-07-27 16:51:52 DEBUG CHECKVERSION :: git rev-list --left-right "@{upstream}"...HEAD : returned succ