This file contains 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 { createCanvas, loadImage } from "@napi-rs/canvas" | |
import fs from "fs" | |
const ALPHA_THRESHOLD = 255 * 0.1 // 1% | |
const cropImageToContent = async (src: string, newSrc: string) => { | |
const canvas = createCanvas(256, 256) | |
const ctx = canvas.getContext("2d") | |
const img = await loadImage(src) |
This file contains 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
// ==UserScript== | |
// @name PoE total MTX points cost | |
// @namespace https://arnoldsk.lv/ | |
// @version 2024-08-09 | |
// @description Counts total MTX points spent in Path of Exile | |
// @author ArnoldsK | |
// @match https://*.pathofexile.com/my-account/microtransactions* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=pathofexile.com | |
// @grant none | |
// ==/UserScript== |
This file contains 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
#!/bin/bash | |
# Fix the audio | |
for FILE in *; do | |
if [[ $FILE == *.MP4 ]]; then | |
NEWFILE=$(shuf -zer -n10 {A..Z} {a..z} {0..9}) | |
echo "Working on ${FILE}..." | |
ffmpeg -v error -i $FILE -c:v libx264 -crf 22 "${NEWFILE}-audio-fix.mp4" |
This file contains 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
// ==UserScript== | |
// @name Instagram media | |
// @namespace https://arnoldsk.lv/ | |
// @version 0.1 | |
// @description small images? cringe | |
// @author ArnoldsK | |
// @match https://www.instagram.com/* | |
// @grant none | |
// ==/UserScript== |
This file contains 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
#!/bin/bash | |
# Usage: | |
# ~$ sh reduce_video_file_size.sh [./input.mp4] [size mb] [./output.mp4] | |
# Parameters can be preset or set by providing none | |
# Input and output names must end with ".mp4" | |
# Can use Git Bash to run the script on Windows | |
display_help() { | |
local FILE=`basename "$0"` |