Skip to content

Instantly share code, notes, and snippets.

@agyild
agyild / NVScaler.glsl
Last active May 16, 2024 20:34
NVIDIA Image Scaling v1.0.2 for mpv
// The MIT License(MIT)
//
// Copyright(c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files(the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and / or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions :
@erickyun
erickyun / ytdl trimmerV1.bat
Last active February 7, 2024 16:11
Download only part of a youtube video
@setlocal
@echo off
set /p "URL=Enter URL here: "
set /p "START_TIME=Enter START_TIME here: "
set /p "END_TIME=Enter END_TIME here: "
set /p "END_FILENAME=Enter END_FILENAME here: "
set "VIDEO_URL= "
@erickyun
erickyun / ytdl trimmerV2.bat
Last active February 7, 2022 14:57
Download only part of a youtube video
@ECHO OFF
color 0A
ECHO ======================================================================================================================
ECHO.
SET /P vURL="[Enter video URL] "
ECHO.
SET /P StartTime="[Enter Start Time] "
SET /P EndTime="[Enter End Time] "
ECHO.
ECHO ======================================================================================================================
@erickyun
erickyun / ytdl-clip-bash-script-v3.sh
Last active January 3, 2022 07:24
Download only part of a youtube video
#!/data/data/com.termux/files/usr/bin/bash
echo "Enter URL here:"
read URL
echo "Enter START_TIME here:"
read START_TIME
echo "Enter END_TIME here:"
read END_TIME
@erickyun
erickyun / ytdl-clip-bash-script-v2.sh
Last active January 2, 2022 18:16
Download only part of a youtube video
#!/data/data/com.termux/files/usr/bin/bash
echo "Enter URL here:"
read URL
echo "Enter START_TIME here:"
read START_TIME
echo "Enter END_TIME here:"
read END_TIME
@erickyun
erickyun / ytdl-clip-bash-script-v1.sh
Last active September 4, 2022 13:43 — forked from Ryu1845/clip.sh
Download only part of a youtube video
#!/data/data/com.termux/files/usr/bin/bash
echo "Enter URL here:"
read URL
echo "Enter START_TIME here:"
read START_TIME
echo "Enter END_TIME here:"
read END_TIME
@xarblu
xarblu / mpv-yt-thumbnail-as-cover-art.lua
Last active March 26, 2024 13:49
A very simple script for mpv that allows playing YouTube audio while displaying the videos thumbnail.
--Very simple mpv script that disables video on YouTube videos
--and instead shows the video thumbnail.
--Because there is no toggle for this I recommend only calling
--the script via the "--scripts-append" flag unless you always
--want to just see video thumbnails.
--Set this to 1 if you use Windows
windows = 0
function thumbnail_as_cover()
@Ryu1845
Ryu1845 / clip.sh
Created November 21, 2021 20:14
Download only part of a youtube video
#!/bin/bash
clip() {
YOUTUBE_URL="${1}"
START_TIME="${2}"
END_TIME="${3}"
END_FILENAME="${4}"
AUDIO_URL="$(yt-dlp "${YOUTUBE_URL}" -g -f bestaudio)"
VIDEO_URL="$(yt-dlp "${YOUTUBE_URL}" -g -f bestvideo)"
ffmpeg \
@HimDek
HimDek / Hyper-V in Windows 10 and Windows 11 Home Edition.md
Last active May 29, 2024 12:50
Hyper-V is supported in Pro, Enterprise and Education Edition of Windows 10 and Windows 11. This guide will show you how to enable Hyper-V in Home Editions of Windows 10 and Windows 11.

Hyper-V in Windows 10 and Windows 11 Home Edition

Hyper-V in Windows 10 and Windows 11 allows running Virtual Machine. It is supported only in Pro, Enterprise and Education Edition of Windows 10 and Windows 11 by default. But this guide will show you how to enable it in Home Editions of Windows 10 and Windows 11.

Check if virtualization is enabled:

  • Search for Command Prompt in Windows Start Menu and open it.
  • Type systeminfo and press Enter. Wait for the process to finish
  • Once the results appear, search for the Hyper-V Requirements section which is usually the last one. 11
    • If it says A hypervisor has been detected. Features required for Hyper-V will not be displayed. that means Hyper-V is already enabled and there is no reason following this guide anymore.
  • Otherwise, check for Virtualization Enabled in Firmware:.
@porthunt
porthunt / read_github_json.py
Created August 6, 2021 19:49
Read json file from a private GitHub repository
import base64
import json
import requests
REPO_URL = "https://api.github.com/repos/<USER>/<REPO>/contents/<PATH>/<TO>/<FILE>.json"
TOKEN = "<YOUR PAT OR OAUTH TOKEN>"
headers = {
"Authorization": f"token {TOKEN}",
"Accept": "application/vnd.github.v4+raw"