Skip to content

Instantly share code, notes, and snippets.

View Hellowlol's full-sized avatar

Steffen Fredriksen Hellowlol

  • Kristiansand, Norway
View GitHub Profile
@Hellowlol
Hellowlol / whatthefork
Last active November 21, 2022 07:55
Check all forked branches if they are ahead of master/self open in browser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Dirty script to check if any forks in ahead of master and open that branch commitlist
Warning: Uses alot of api calls
"""
import requests
from requests.auth import HTTPBasicAuth
@Hellowlol
Hellowlol / kill_a_stream.py
Last active January 18, 2021 14:37
Plexpy script, kill a plex stream
"""
This is a simple script showing how you can used plexpys notifications system to kill a stream
Possible plexpyargs: -tk {transcode_key} -u {username} -td {transcode_decision} -t 20:20 -ln Secret_tash
Instructions:
1. Save the script somewhere on your computer as kill_a_stream.py.
@Hellowlol
Hellowlol / restart_plex.bat
Last active February 21, 2020 01:53
Restart plex plexpyscript
REM Add this script to Plex down and/or Plex remote down to restart plex if
REM server is unreachable.
TASKKILL /f /im "Plex Media Server.exe"
TASKKILL /f /im "PlexScriptHost.exe"
"C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe"
@Hellowlol
Hellowlol / throttle_nzbclient.py
Last active January 3, 2020 02:48
Simple script to throttle sabnsbd and nzbget
from __future__ import print_function
import argparse
import requests # pip install requests
import sys
from jsonrpclib import jsonrpc # pip install jsonrpclib-pelix
"""
Simple script to throttle nzb clients for plexpy
1. Download latest ubuntu destop image.
2. Download https://rufus.ie/ follow this guide.
3. Boost the untunu image, using, change boot order in bios if needed (f2)
4. Use grub to delete any old partition on ssd.
5. Download the lastest hassio image for your nuc
6. DO the command: gunzip -c /home/ubuntu/Downloads/hassos_intel-nuc-2.12.img.gz | sudo dd of=/dev/sda Make sure you change the device and the image version.
@Hellowlol
Hellowlol / tqdm_multithread.py
Last active October 25, 2019 04:43
tqdm thread subprocess ffmpeg
import random
import re
import subprocess
import time
def example_func(*args):
for i in range(1, 101):
s = random.choice([0.1, 0.3, 0.5, 0.7, 0.9])
@Hellowlol
Hellowlol / IMDb top 250
Last active January 18, 2019 19:03
top250
from plexapi.server import PlexServer
from imdbpie import Imdb
baseurl = 'http://10.0.0.97:32400'
token = ''
plex = PlexServer(baseurl, token)
imdb = Imdb()
top = imdb.top_250()
@Hellowlol
Hellowlol / telenorsms.py
Created April 7, 2014 21:15
telenor sms api python
#--coding: utf-8--
import urllib2
import urllib
from sys import argv
'''
Used for sending texts via telenor norway smapi
Send passord to 1999 to get your password
You will be billed by telenor for the usage even if sms is included in your subscription
'''
msg = argv[1]
@Hellowlol
Hellowlol / skip_intro_ffmpeg.py
Last active February 24, 2018 18:05
Find end of intro using ffmpeg filters blackdetect and silencedetect
import subprocess
import re
from profilehooks import timecall
def with_in(first, second, dev=5):
x = first - second
y = second - first
from collections import Counter
urllib2
from uuid import getnode
import platform
import json
ip = ''
port = ''
plextoken = ''
url = 'http://%s:%s/' % (ip, port)