Skip to content

Instantly share code, notes, and snippets.

@xarblu
xarblu / mpv-yt-thumbnail-as-cover-art.lua
Last active January 16, 2025 20:33
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 July 8, 2026 12:55
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"
@FreddieOliveira
FreddieOliveira / docker.md
Last active July 11, 2026 07:38
This tutorial shows how to run docker natively on Android, without VMs and chroot.

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60
@oofnikj
oofnikj / answerfile
Last active June 22, 2026 12:21
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@heri16
heri16 / README.md
Last active March 23, 2022 04:02
Download / Record Youtube Live stream
@patelneel55
patelneel55 / video-merge.ps1
Last active July 30, 2025 11:18
video-merge.ps1 - Merge multiple media files into a single or a group of files using ffmpeg
#########################################
# Quick script to merge video files #
#########################################
<#
.SYNOPSIS
Concatenates a list of video files into one or multiple video files.
.DESCRIPTION
This application allows you to feed it a list of all video files to be combined and combines them to another media files with every file containing 'max' original files.
@TheDrHax
TheDrHax / autosave.lua
Last active April 17, 2026 13:05 — forked from Hakkin/autosave.lua
MPV script that periodically saves "watch later" data during playback
-- autosave.lua
--
-- Periodically saves "watch later" data during playback, rather than only saving on quit.
-- This lets you easily recover your position in the case of an ungraceful shutdown of mpv (crash, power failure, etc.).
--
-- You can configure the save period by creating a "lua-settings" directory inside your mpv configuration directory.
-- Inside the "lua-settings" directory, create a file named "autosave.conf".
-- The save period can be set like so:
--
-- save_period=60