Author: remo

  • 升级服务器系统

    Upgrade server system

    The system was upgraded to Debian 13 x86_64.

    SSH is enabled only. The underlying components are Nginx 1.26.3, PHP 8.4.23, MariaDB 11.8.6, Docker 26.1.5, Compose 2.26.1, and Swap 4 GB.

    Apply resource/log limits to SSH, nftables, Fail2ban, PHP-FPM, MariaDB, and Docker.

    SSH password login disabled; root user only allowed key-based login; nftables defaults to denying and allowing logins. 22/80/443/1935.

    HTTPS Certbot scheduled renewal is now enabled.

  • 尝试使用MkDocs给实验室编写公开文档

    Try using MkDocs to write public documentation for the lab.

    https://remyuu.github.io/VIS_Hiroshima

    I wrote some documentation for the lab on how newcomers can connect to the school's computer lab server using SSH. It covers Chinese, English, and Japanese, and supports submitting edits.

  • 服务器增加虚拟内存

    The server increases virtual memory.

    free -h
    df -h /
    
    fallocate -l 4G /swapfile
    chmod 600 /swapfile
    mkswap /swapfile
    swapon /swapfile
    
    echo '/swapfile none swap sw 0 0' >> /etc/fstab
    
    sysctl vm.swappiness=20
    echo 'vm.swappiness=20' >> /etc/sysctl.conf
    
    free -h
    swapon --show
    
    JavaScript
  • 安卓手机公网监控摄像头推流

    Android phone public network surveillance camera streaming

    Security issue: Currently, unauthorized streaming is prevented only by using a random Stream Key.

    Using an Android phone as a camera, stream the video to remoooo.com via RTMP, and view it via https://remoooo.com/webcam with a password.

    Android phones stream to the Public Server via RTMP.

    The server connects to MediaMTX and converts it to an HLS listening address on the local machine.
    localhost is reverse proxyed to nginx, using HTTPS + Basic Auth, and finally viewed in Browser Viewer.

    Viewing link: rtmp://example.com:1935/

    In simple terms, the server uses MediaMTX as a media gateway. MediaMTX is responsible for receiving RTMP streams from mobile devices and converting them into HLS streams that can be played in a browser.

    RTMP App:

    Protocol: RTMP
    Server URL: rtmp://example.com:1935
    Stream Key: <stream-key>
    Video Codec: H.264
    Audio Codec: AAC
    Resolution: 1280x720
    FPS: 30
    Video Bitrate: 2000-3000 kbps
    Audio Bitrate: 96-128 kbps
    Keyframe Interval: 2s
    Bash
  • Ghostty 美化配置 config

    Ghostty customization configuration

    # =========================
    # Ghostty aesthetic config
    # =========================
    
    # ---------- Font ----------
    font-family = JetBrainsMono Nerd Font
    font-family = Maple Mono NF CN
    font-family = Noto Sans CJK SC
    font-family = Symbols Nerd Font Mono
    font-size = 14
    font-thicken = true
    font-thicken-strength = 64
    
    # ---------- Theme ----------
    theme = dark:Catppuccin Frappe,light:Catppuccin Latte
    
    # ---------- Window ----------
    window-padding-x = 12
    window-padding-y = 10
    window-padding-balance = true
    window-padding-color = background
    window-save-state = always
    
    # ---------- Transparency / Blur ----------
    background-opacity = 0.58
    background-blur = macos-glass-regular
    background-opacity-cells = false
    
    # ---------- Cursor ----------
    cursor-style = bar
    cursor-style-blink = false
    cursor-color = #e78284
    cursor-text = #303446
    cursor-click-to-move = true
    mouse-hide-while-typing = true
    adjust-cursor-thickness = 2
    
    # ---------- Selection ----------
    selection-background = #626880
    selection-foreground = #c6d0f5
    
    # ---------- macOS titlebar ----------
    macos-titlebar-style = sil
    macos-titlebar-proxy-icon = hidden
    macos-window-buttons = visible
    macos-option-as-alt = true
    
    # ---------- Shell integration ----------
    shell-integration = detect
    shell-integration-features = cursor,title,sudo,ssh-env,ssh-terminfo
    
    # ---------- Notifications ----------
    notify-on-command-finish = unfocused
    
    # ---------- Quick terminal ----------
    keybind = global:ctrl+grave_accent=toggle_quick_terminal
    quick-terminal-position = top
    quick-terminal-size = 42%
    quick-terminal-autohide = true
    
    # ---------- Keybinds ----------
    keybind = cmd+shift+r=reload_config
    keybind = cmd+d=new_split:right
    keybind = cmd+shift+d=new_split:down
    keybind = cmd+t=new_tab
    keybind = cmd+w=close_surface
    keybind = cmd+shift+up=jump_to_prompt:-1
    keybind = cmd+shift+down=jump_to_prompt:1
    keybind = cmd+shift+b=toggle_background_opacity
    JavaScript
  • 快捷查看服务器基本信息

    Quickly view basic server information

    printf ""CPU:\n"" && LC_ALL=C lscpu | grep -E &#39;^[[:space:]]*(Model name|CPU\(s\)|Thread\(s\) per core|Core\(s\) per socket|Socket\(s\)|CPU max MHz|CPU min MHz):&#39; && \
    printf ""\nMEM:\n"" && free -h && \
    printf ""\nDISK:\n"" && lsblk -o NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS,MODEL,ROTA && \
    printf ""\nFILESYSTEM:\n"" && df -hT && \
    printf ""\nGPU:\n"" && nvidia-smi -L
    Bash
  • 做了一个硬件监控软件

    I made a hardware monitoring software

    I recently had some free time, so I made a hardware testing software.

    The current concept has been largely realized: viewing CPU load, temperature, power consumption, and frequency, memory usage and temperature, and GPU load, temperature, and power consumption on a single, compact page. The design language is close to Windows 11, and all components are open source.

    The technology stack is Avalonia and .NET 8, the data acquisition backend uses LibreHardwareMonitor, and ring0 is supported by PawnIO.

    A simple leaderboard function was also implemented, and the leaderboard server used a simple yet secure method. Since PDO directly connects to MariaDB and employs common optimization techniques such as pagination, the design capacity is around 100,000 data entries.

    View leaderboards on the web:https://remoooo.com/remo-benchmark/

    The software update reads the Release page from GitHub.

    The project is completely open source:

    https://github.com/Remyuu/RemoSystemProfiler