Skip to content

Instantly share code, notes, and snippets.

View Venipa's full-sized avatar
:shipit:
Working from home

Venipa

:shipit:
Working from home
View GitHub Profile
@Venipa
Venipa / move-media-to-folder-level.ps1
Created August 11, 2025 14:44
Moves video files under folders to the upper level and adopts the folder name.
# Moves video files under folders to the upper level and adopts the folder name.
# for example FolderA\FileA.mp4 => FolderA.mp4
# duplicates will append a number, FolderA_<1-100>.mp4, max 100 files can be moved to the upper level.
#
# Use cases:
# - Movie folders with the movie inside
# - Single Album Covers with single or multiple of the same cover.
#
# Check if the first argument is a folder; otherwise, prompt for a folder
# Check if the first argument exists and is a folder; if so, use it as the base directory
@Venipa
Venipa / enable-naraka-advanced-physics.ps1
Last active July 30, 2025 19:13
Enables Naraka's "Advanced" Physics for certain bodyparts.
# Find Naraka: Bladepoint installation path from Steam library folders
# Get Steam installation path from registry
# Get all Steam library paths from registry
$steamLibraries = @()
# Try to get main Steam path from both possible registry locations
$steamRegPaths = @(
"HKLM:\SOFTWARE\WOW6432Node\Valve\Steam"
)

Genshin Impact Account Summary

Spending Analysis

Metric Value
5★ Characters 44
4★ Characters 42
5★ Weapons 32
4★ Weapons 28
@Venipa
Venipa / cva-factory.ts
Created January 31, 2023 01:24
small factory for one liner components
import { cva, VariantProps } from "class-variance-authority";
import { ReactElement } from "react";
type CreateCVAProps<T> = Parameters<typeof cva<T>>;
export function createCVA<P = {}, T = any>(base?: CreateCVAProps<T>[0], config?: CreateCVAProps<T>[1]) {
const baseClassName = cva(base, config);
type cxProps = VariantProps<typeof baseClassName>;
type ComponentProps = P & cxProps;
return function (this: any, element: <P2 = {}>(prop: ComponentProps & P2 & { className: string }) => ReactElement<P, any>) {
return function (props: ComponentProps) {
return element({ ...props, className: baseClassName(props as any) });
@Venipa
Venipa / linux_curly_braces_alt_for_pwsh.ps1
Created January 28, 2023 06:32
behaviour of bash's curly braces
# yarn add example, linux: "yarn add @radix-ui/react-{...}"
("yarn add " + ("alert-dialog,collapsible,context-menu,checkbox,avatar,accordion,dialog,dropdown-menu,hover-card,navigation-menu,popover,menubar,progress,radio-group,scroll-area,select,switch,tabs,toast,toolbar,aspect-ratio".Split(",") | % { "@radix-ui/react-$_" }) -join " ") | Invoke-Expression
// ==UserScript==
// @name Twitter HTML5 Video
// @namespace https://venipa.net
// @version 0.1
// @description try to take over the world!
// @author Venipa
// @match https://twitter.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=twitter.com
// @updateUrl https://gist.github.com/Venipa/74a751f64699a9a1f25b8548d1615bd6/raw/twitter-html5-player.user.js
// @grant unsafeWindow
@Venipa
Venipa / 00.convert to jpeg.c.cmd
Last active July 17, 2022 04:01
Shell-x convert images to jpeg
@echo off
for %%x in (%*) do (
echo converting %%~nxx to %%~nx.jpg
magick "%%~x" "%%~dpx\%%~nx.jpg"
)
@echo on
if %errorlevel% neq 0 pause
@Venipa
Venipa / thot_tube.user.js
Last active June 3, 2022 20:48
thot.tube bulk download unlocked images in page
// ==UserScript==
// @name ThotTube-Extended
// @namespace https://github.com/Venipa/thot-tube-userscript
// @copyright 2022, thot-tube-userscript (https://github.com/Venipa/thot-tube-userscript)
// @version 1.0.0
// @description Bridge between the desktop and webbrowser to download and merge video & audio from coub
// @author Venipa
// @match https://thot.tube/thread-*
// @connect thot.tube
// @grant none
const ensureDomLoaded = (f) => {
if (["interactive", "complete"].indexOf(document.readyState) > -1) {
f();
} else {
let triggered = false;
document.addEventListener("DOMContentLoaded", () => {
if (!triggered) {
triggered = true;
setTimeout(f, 1);
}
// ==UserScript==
// @name 9gag HTML5 Video
// @namespace https://venipa.net
// @version 0.1
// @description try to take over the world!
// @author Venipa
// @match https://9gag.com/*
// @icon https://www.google.com/s2/favicons?domain=9gag.com
// @grant unsafeWindow
// ==/UserScript==