Skip to content

Instantly share code, notes, and snippets.

View Minemobs's full-sized avatar
💭
yes

minemobs Minemobs

💭
yes
View GitHub Profile
@Minemobs
Minemobs / ani-cli.ps1
Last active August 26, 2025 21:28
A TUI anime player, requires ast-grep, jq, fzf, mpv, ugrep
#region --- Consts / Settings ---
$DEFAULT_CONFIG = @'
{
"animesama": {
"weights": {
"video.sibnet.ru": 100,
"vidmoly.to": -100,
"Smoothpre.com": -1000
}
}
@Minemobs
Minemobs / franime.ps1
Last active November 3, 2024 14:49
Franime script in powershell (requires fzf and chafa)
$tempDir = "$([System.IO.Path]::GetTempPath())"
$animeListJsonPath = "$tempDir/franime-animes.json"
$fzfPreview='(iwr "$($env:FRANIME_JSON_POSTER.Trim().Split("`r`n") | where { $_.Split(" ")[1] -eq ({}).Split(" ")[-1] } | % { $_.Split(" ")[2].Trim() })").Content | chafa -f sixels --clear --size=40x30'
function downloadAnimeList() {
if(Test-Path $animeListJsonPath -PathType Leaf) {
return (Get-Content $animeListJsonPath) | ConvertFrom-Json
}
Write-Host "Downloading anime list"
$json = (iwr https://api.franime.fr/api/animes/).Content
@Minemobs
Minemobs / shonenjumpplus.ps1
Last active August 14, 2024 14:24
A simple powershell script to extract ShonenJump+ chapters and unpuzzle them. This script requires Imagemagick
$mult = 8
$div = 4
function fail([int]$code, [string]$msg) {
Write-Error $msg
exit $code
}
function chunk([object[]]$source, [int]$size = 1) {
$chunkCount = [Math]::Ceiling($source.Count / $size)
@Minemobs
Minemobs / ytermusic-cookies.ps1
Last active August 11, 2024 18:21
Extracts your youtube cookies and puts them in ytermusic headers.txt config (WINDOWS ONLY)
$sqlitePath = "$Env:APPDATA\Mozilla\Firefox\$((cat $Env:APPDATA\Mozilla\Firefox\profiles.ini).Split("`n")[1].Split("=")[1].Replace("/", "\"))\cookies.sqlite"
$cookies = [string]::join(";", (sqlite3.exe -list -separator '=' $sqlitePath "SELECT name, value FROM moz_cookies WHERE host glob '*youtube*' AND originAttributes = '' AND value != '' AND isSecure = 1;"))
New-Item -Path $Env:APPDATA\ccgauche\ytermusic\config -Name headers.txt -ItemType "file" -Force -Value "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0`nCookie: $cookies;wide=0"
function fail([int]$code, [string]$msg) {
Write-Error $msg
exit $code
}
function getValidURL([string]$url) {
$lastChar = $url[-1]
if($lastChar -ne "/") {
return "$url/"
}
#!/bin/env bash
MAX_PROCESSES=6
function fail {
printf '%s\n' "$1" >&2 ## Send message to stderr.
exit "${2-1}" ## Return a code specified by $2, or 1 by default.
}
function getValidURL {
@Minemobs
Minemobs / mcServer.sh
Created May 23, 2024 18:16
Makes a Minecraft Server with itzg's docker image
#!/bin/env bash
trim () {
read -rd '' $1 <<<"${!1}"
}
read -p "Enter Server name: " -r serverName
trimmedServerName="$serverName"
trim trimmedServerName
@Minemobs
Minemobs / clicktune.user.js
Created May 12, 2024 11:11
A dlink4 / clicktune bypasser
// ==UserScript==
// @name dlink4/clicktune bypasser
// @version 2024-05-12
// @description try to take over the world!
// @author minemobs
// @match https://www.dlink4.com/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=dlink4.com
// @grant none
// ==/UserScript==
@Minemobs
Minemobs / scrollToBuiltin.user.js
Last active May 6, 2024 16:52
A tempermonkey userscript to scroll to a specific bash builtin
// ==UserScript==
// @name Scroll to bash builtin
// @namespace http://tampermonkey.net/
// @version 2024-05-06
// @description Scrolls to bash builtin
// @author minemobs
// @match https://www.mankier.com/1/bash
// @icon https://www.google.com/s2/favicons?sz=64&domain=mankier.com
// @grant none
// ==/UserScript==
@Minemobs
Minemobs / nfd.py
Created April 29, 2024 15:20
A simple (not finished) nativefiledialog-extended python wrapper
from ctypes import cdll, pointer, Structure, c_char_p
from enum import IntEnum
from sys import platform
from typing import Optional, Tuple, cast
class NFDFilterItem(Structure):
_fields_ = [("name", c_char_p), ("spec", c_char_p)]
class NFDStatus(IntEnum):