Skip to content

Instantly share code, notes, and snippets.

View Hellowlol's full-sized avatar

Steffen Fredriksen Hellowlol

  • Kristiansand, Norway
View GitHub Profile
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 / 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
@Hellowlol
Hellowlol / gist:85f2748889b23a5709066481bff27c2c
Last active September 2, 2017 18:14
Archive sdtv, sd dvd medusa
import requests
apikey = ''
U = 'http://10.0.0.97:9009/'
AU = U + 'api/v1/' + apikey +'?cmd=%s'
session = requests.Session()
episodes_to_archive = []
archive_qualitys = ['SD', 'SD DVD', 'SDTV']
@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()
import time
from plexapi.server import PlexServer
from functools import partial
baseurl = 'http://localhost:32400'
token = ''
plex = PlexServer(baseurl, token)
JUMPTO = 60
@Hellowlol
Hellowlol / update_all_metadata.py
Last active August 19, 2017 21:17 — forked from JonnyWong16/update_all_metadata.py
Updates all metadata in the PlexPy database after moving Plex libraries.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Updates all metadata in the PlexPy database after moving Plex libraries.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
from plexapi.server import PlexServer
import requests
@Hellowlol
Hellowlol / collection_from_rating_keys.py
Created July 15, 2017 23:49 — forked from JonnyWong16/collection_from_rating_keys.py
Create a Plex collection from a text file list of rating keys.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Description: Create a Plex collection from a text file list of rating keys.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests
import requests
from plexapi.server import PlexServer
@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 / async.py
Created April 23, 2017 01:01 — forked from hemanth/async.py
Async subprocess execution in python.
import sys
from subprocess import PIPE, Popen
from threading import Thread
try:
from Queue import Queue, Empty
except ImportError:
from queue import Queue, Empty # python 3.x
ON_POSIX = 'posix' in sys.builtin_module_names
@Hellowlol
Hellowlol / aired_today_playlist.py
Last active March 4, 2017 15:20 — forked from blacktwin/aired_today_playlist.py
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first, using PlexAPI
"""
Create a Plex Playlist with what was aired on this today's month-day, sort by oldest first.
If Playlist from yesterday exists delete and create today's.
If today's Playlist exists exit.
"""
# Untested requires plexapi 3.0.0.
from plexapi.server import PlexServer
import requests