Skip to content

Instantly share code, notes, and snippets.

View TangentFoxy's full-sized avatar

Rose Liverman TangentFoxy

View GitHub Profile
@TangentFoxy
TangentFoxy / video-dl.lua
Last active January 14, 2024 02:42
Simple YT-DLP Frontend
#!/usr/bin/env luajit
-- THIS IS BEING MAINTAINED AT https://github.com/TangentFoxy/.lua-files
-- GO THERE INSTEAD OF DOWNLOADING THIS FILE DIRECTLY.
local helptext = [[Usage:
./video-dl.lua [action] <url>
[action]: What is desired.
@TangentFoxy
TangentFoxy / file_size_stats.lua
Last active January 14, 2024 02:52
Generate statistics on file sizes within a directory. (Lua, using LuaFilesystem.)
#!/usr/bin/env luajit
-- THIS IS BEING MAINTAINED AT https://github.com/TangentFoxy/.lua-files
-- GO THERE INSTEAD OF DOWNLOADING THIS FILE DIRECTLY.
-- Primarily written by ChatGPT using GPT-3.5, with corrections and modifications by me.
-- Do whatever the hell you want with it.
local lfs = require "lfs"
@TangentFoxy
TangentFoxy / invidious-bookmarklet.js
Last active August 17, 2023 06:52 — forked from hisaac/invidious-bookmarklet.js
Modified for personal use. Points to my own domain.
// The bookmarklet does a couple things:
// If the current page in the browser is a YouTube page, it will open that video in `invidious.xyz`
// If the current page in the browser is _not_ a YouTube page, it will open the `invidious.xyz` homepage
//
// To use: Copy/Paste the code below into the bookmark's address:
javascript:location.hostname.includes("youtube.com")?location.assign("https://invidious.tangentfox.com"+location.pathname+location.search+location.hash):location.assign("https://invidious.tangentfox.com");
@TangentFoxy
TangentFoxy / vtt2text.py
Created August 17, 2023 06:45 — forked from glasslion/vtt2text.py
This script convert youtube subtitle file(vtt) to plain text.
"""
Convert YouTube subtitles(vtt) to human readable text.
Download only subtitles from YouTube with youtube-dl:
youtube-dl --skip-download --convert-subs vtt <video_url>
Note that default subtitle format provided by YouTube is ass, which is hard
to process with simple regex. Luckily youtube-dl can convert ass to vtt, which
is easier to process.
@TangentFoxy
TangentFoxy / shellinabox.sh
Last active April 26, 2018 20:08
Easy-to-use install script for shellinabox. https://github.com/shellinabox/shellinabox
sudo apt-get update
sudo apt-get install git libssl-dev libpam0g-dev zlib1g-dev dh-autoreconf -y
sudo apt-get install git libssl-dev libpam0g-dev zlib1g-dev dh-autoreconf -y # duplicated because errors I encountered that were fixed by just running it again
git clone https://github.com/shellinabox/shellinabox.git
cd shellinabox
autoreconf -i
autoreconf -i # duplicated beause errors I encountered that were fixed by just running it again
./configure
make
dpkg-buildpackage -b
@TangentFoxy
TangentFoxy / KeyConstants.moon
Created March 26, 2018 03:09
LÖVE's key constants separated into their categories.
KeyConstants = {
character: {
space: true -- 0.10+ version of space
}
numpad: {
kpenter: true
}
navigation: {
up: true
down: true
@TangentFoxy
TangentFoxy / mov2mp4.ps1
Created September 22, 2017 00:37
Simple Powershell script to use ffmpeg to convert an MOV file to an MP4 file.
$input = $args[0]
$output = $input.Replace(".MOV", ".mp4")
$output = $output.Replace(".mov", ".mp4") # in case ext is lowercase
ffmpeg -i "$input" -vcodec copy -acodec copy "$output"
@TangentFoxy
TangentFoxy / Persist History.ps1
Created September 7, 2017 04:42
Making PowerShell history persist between sessions.
# Usage: run this file, it will install itself
# to $profile and be run from there
# Make sure $profile exists.
if (! (Test-Path $profile) ) {
New-Item -Path $profile -ItemType File -Force
}
# Find ourselves and where we should be.
$me = $PSCommandPath # $MyInvocation.MyCommand.Definition
@TangentFoxy
TangentFoxy / Class.lua
Last active December 9, 2017 17:29
MoonScript-compatible class function for Lua.
-- This is an implementation of classes compatible with MoonScript's classes.
-- CC0 license
-- Usage:
-- local Class = require "Class"
-- local SomeClass, BaseObject = Class("NameOfClass")
-- define your own init:
-- function SomeClass:__init() end
@TangentFoxy
TangentFoxy / identity.md
Created September 10, 2016 03:17
Keybase proof.

Keybase proof

I hereby claim:

  • I am Guard13007 on github.
  • I am guard13007 (https://keybase.io/guard13007) on keybase.
  • I have a public key whose fingerprint is 1A74 AE9E 1AFC 020C CBFE 5A8E 8CD5 45C0 0785 7098

To claim this, I am signing this object: