Fun Blender Stuff
24. 10. 2025by Ducky 3D, video playlist:
https://www.youtube.com/playlist?list=PLNShHVjao84dfLoy0Xljoo0LEtxJRdvYu
by Ducky 3D, video playlist:
https://www.youtube.com/playlist?list=PLNShHVjao84dfLoy0Xljoo0LEtxJRdvYu
https://replacement.ai
https://news.ycombinator.com/item?id=45634095
āAI will probably most likely lead to the end of the world, but in the meantime, thereāll be great companies.ā Sam Altman, CEO of OpenAI
tldr: Share a file (no web interface, curl only) up to 512Mib for at least 30 days.
curl -F'file=@yourfile.png' https://0x0.st
Windows, add an upload entry to Total Commander Start menu:
Make a new start entry with title like āupload to 0x0.st (single file, max 512 M)ā, with parameters:
Title: upload to 0x0 (single file, max 512M)
Command: cmd /k
Parameters: curl -F "file=@%Q%P%N" https://0x0.st
Start path: %COMMANDER_PATH%\..\util\curl\bin\
where %P is the source path to be inserted into the command line, including a backslash () at the end, and %N places the filename under the cursor into the command line. %Q Turn off automatic quotation marks around certain parameters like %P%N when the name contains a space. The user will then have to place them by himself. < From TC help.
A slightly more complex version of āParametersā would be:
curl -F "file=@%Q%P%N" https://0x0.st && certutil -hashfile "%Q%P%N" MD5 | find /v "hash" && echo %Q%N
edit: They say, that %Q is only needed once, so this would be the same:
%Qcurl -F "file=@%P%N" https://0x0.st && certutil -hashfile "%P%N" MD5 | find /v "hash" && echo %N
which shall return md5sum and filename under the 0x0 url, for example
https://0x0.st/KQqA.jpg
b4d6c9d0d4840490c0739e0a46c47391
image.jpg
And Uber version, which also stores url to clipboard and shows some curl progress:
curl -# -F "file=@%Q%P%N" -Fsecret= https://0x0.st | clip && powershell -Command "$t=(Get-Clipboard).Trim(); Write-Host $t -NoNewline" && echo. && certutil -hashfile "%P%N" MD5 | find /v "hash" && echo %N
Super mega version, a batch script written by KozakMak, that can upload multiple files. Put the script uploader.bat next to the curl and patch to the new menu item like this:
Title: upload to 0x0 via batch script (multiple files, max per file 512M)
---
Command: uploader.bat
Parameters: %P%S
Start path: %COMMANDER_PATH%\..\util\curl\bin\
Note, that there is no %Q in this case.
apt install sway
brings bunch of goodies with it (including foot terminal).
Change keyboard layout:
sway input type:keyboard xkb_layout <country code>
or in sway config, this seems to work:
#keyboard
input "1:1:AT_Translated_Set_2_keyboard" {
xkb_layout <country code>
}
Copy foot and sway configs to your home dir.
mkdir -p .config/fontconfig
cd .config/fontconfig
vim fonts.conf
put
<match target="pattern">
<test name="family" qual="any">
<string>monospace</string>
</test>
<edit binding="strong" mode="prepend" name="family">
<string>EnvyCodeR Nerd Font Mono</string>
</edit>
</match>
sudo apt install foot-themes
# they will appear in /usr/share/foot/themes
in .config/foot/foot.ini
include=/usr/share/foot/themes/catppuccin-frappe
A bash script in $HOME/bin/swayStatusCommand
#!/bin/bash
main () {
awk '/MemTotal/ {t=$2} /MemAvailable/ {a=$2} END {printf("%.1f", a/t*100)}' /proc/meminfo
echo -n "% memory free | "
date +'%Y-%m-%d %H:%M'
}
print="$(main)"
echo "$print"
and in sway config under ābarā
status_command while $HOME/bin/swayStatusCommand; do sleep 3; done
will display free mem in percents before the clock.
In .zshrc add
# term info for foot?
# Called when executing a command
function preexec {
print -Pn "\e]0;${(q)1}\e\\"
}
Or easier/better looking, just disable titlebars in sway config
# border
default_border pixel 6
default_floating_border pixel 6
#for_window [app_id="foot"] border pixel 4
# hide split indicator borders when only one window?
hide_edge_borders smart
Resizing with mice will be easier on fatter borders btw.
Use gnome-tweaks to change font(cuprum) or nwg-look to change theme.
In sway config replace
set $menu wmenu-run
with
set $menu wmenu-run -b -l 5 -f "monospace 14"
to have wmenu show at the bottom of the screen and in vertical fashion. Change some shortkeys in sway config
# Swap focus between the tiling area and the floating area
# was $mod+spaces
bindsym $mod+t focus mode_toggle
# Start your launcher
bindsym $mod+d exec $menu
bindsym $mod+space exec $menu
output * bg /home/b/wallpapers/bunsenDark2.png fill
# and in bar colors section
background #30344600
grim takes screenshots
viewnior shows pictures
nmcli manage connection
Scan for networks:
nmcli device wifi rescan
List available networks:
nmcli device wifi list
Connect to a network (prompt for password):
sudo nmcli device wifi connect 'WIFI_SSID' --ask
https://github.com/catppuccin/geany
https://gist.github.com/rmrt1n/10c24dc597f5b31f432694fb95329bff
https://github.com/rbnis/legacy-dotfiles/blob/master/.config/sway/config
to be continued ā¦
Note: Code written by AI. All experiments done on win10 machine.
Goal: Stream my desktop for the purpose of teaching.
More: Provide a remote user with a link that can be opened in browser (or/and VLC). Donāt bother with sound. Use GPU for video encoding to reduce propeller noise.
python server.py
from http.server import HTTPServer, SimpleHTTPRequestHandler
class CORSHandler(SimpleHTTPRequestHandler):
def end_headers(self):
self.send_header('Access-Control-Allow-Origin', '*')
super().end_headers()
port = 8080
server = HTTPServer(('0.0.0.0', port), CORSHandler)
print(f"Serving on http://localhost:{port}")
server.serve_forever()
stream.bat
ffmpeg -f gdigrab -video_size 1920x1080 -framerate 25 -i desktop ^
-c:v h264_nvenc -preset p6 -tune ull ^
-b:v 6000k -maxrate 6000k -bufsize 1200k ^
-g 50 ^
-f hls -hls_time 1 -hls_list_size 3 ^
-hls_flags delete_segments+append_list+omit_endlist ^
-hls_segment_type fmp4 -hls_fmp4_init_filename init.mp4 ^
stream.m3u8
or/and possibly better
stream_gfxcapture.bat (seems to reduce latency for some reason, in loopback mode i get close to 3s. Note that we are now in Variable-Frame-Rate mode.)
ffmpeg -filter_complex gfxcapture=monitor_idx=0:output_fmt=8bit:max_framerate=50 ^
-c:v h264_nvenc -preset p6 -tune ull ^
-b:v 6000k -maxrate 6000k -bufsize 1200k ^
-g 50 ^
-f hls -hls_time 1 -hls_list_size 3 ^
-hls_flags delete_segments+append_list+omit_endlist ^
-hls_segment_type fmp4 -hls_fmp4_init_filename init.mp4 ^
stream.m3u8
player.htm
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HLS Stream</title>
<style>
body { background: #000; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; }
video { width: 80%; height: auto; }
</style>
</head>
<body>
<video id="video" controls autoplay muted></video>
<script src="https://cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script>
const video = document.getElementById('video');
const hlsUrl = 'stream.m3u8'; // your HLS playlist
if (Hls.isSupported()) {
const hls = new Hls({
// optional low-latency tuning
liveSyncDurationCount: 3,
maxBufferLength: 10
});
hls.loadSource(hlsUrl);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, () => video.play());
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
// Safari native HLS support
video.src = hlsUrl;
video.addEventListener('loadedmetadata', () => video.play());
} else {
alert("HLS not supported in this browser");
}
</script>
</body>
</html>
Latency is significant (5 - 30s). CPU usage is still high, possibly ffmpeg is doing something weird (-video_size ? Canāt i just select monitor 1 somehow?). Stuff to try. < FIXED, gfxcapture is the king.
There is also (very similar?) DASH standard, where one could use HEVC encoding, but chrome/firefox will not work with that (mpv/vlc should).
Install zoxide from the page, the curl command
https://github.com/ajeetdsouza/zoxide
Version in debian 13 is to old to support the import āfrom command.
Import db from autojump
zoxide import --from=autojump ".local/share/autojump/autojump.txt" --merge
in .zshrc add
# zoxide
eval "$(zoxide init zsh)"
Make sure zoxide is on $PATH, or in .zshrc add
# /home/b/.local/bin for zoxide
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
Alias j to z
in .bash_aliases or similar file
# autojump to zoxide
alias j='z'
Apt remove autojump, clean autojump entries from .zshrc.
Besides āzā command, there is also āziā which provides interactive fuzzy search over zoxide history.
https://www.youtube.com/watch?v=K9V8UA-oJBE
tsoding / Implementing a Fart Button Website