This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { useState, useEffect } from "react"; | |
import { useRouter } from "next/router"; | |
type IParam = string; | |
type IValue = string | string[] | number | number[] | null | undefined; | |
type IState = { [k: string]: IValue }; | |
type IQuery = IState; | |
type IRoute = string; | |
function isEmpty(value: IValue): boolean { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Next.js' `_app.js` file | |
import Head from 'next/head'; | |
import { useEffect, useState } from 'react'; | |
import '../styles/main.scss'; | |
function useIsMounted() { | |
const [mounted, setMounted] = useState(false); | |
useEffect(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
# | |
# Description: Sync Plex playlists to shared users. | |
# Author: /u/SwiftPanda16 | |
# Requires: plexapi | |
from plexapi.exceptions import NotFound | |
from plexapi.server import PlexServer |