This file contains hidden or 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
#region --- Consts / Settings --- | |
$DEFAULT_CONFIG = @' | |
{ | |
"animesama": { | |
"weights": { | |
"video.sibnet.ru": 100, | |
"vidmoly.to": -100, | |
"Smoothpre.com": -1000 | |
} | |
} |
This file contains hidden or 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
$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 |
This file contains hidden or 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
$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) |
This file contains hidden or 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
function fail([int]$code, [string]$msg) { | |
Write-Error $msg | |
exit $code | |
} | |
function getValidURL([string]$url) { | |
$lastChar = $url[-1] | |
if($lastChar -ne "/") { | |
return "$url/" | |
} |
This file contains hidden or 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/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 { |
This file contains hidden or 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/env bash | |
trim () { | |
read -rd '' $1 <<<"${!1}" | |
} | |
read -p "Enter Server name: " -r serverName | |
trimmedServerName="$serverName" | |
trim trimmedServerName |
This file contains hidden or 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 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== |
This file contains hidden or 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 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== |
This file contains hidden or 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
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): |
NewerOlder