Skip to content

Instantly share code, notes, and snippets.

View NonLogicalDev's full-sized avatar

Oleg Utkin NonLogicalDev

View GitHub Profile
@NonLogicalDev
NonLogicalDev / qmgr.sh
Created June 13, 2025 03:16
QEMU minimal docker compose like manager
#!/bin/bash
# ------------------------------------------------------------------------------
# Script Setup
# ------------------------------------------------------------------------------
# use bashsource variable to get the path of this script
THIS_SCRIPT_PATH=${BASH_SOURCE[0]}
THIS_SCRIPT_DIR=$(cd "$(dirname "$THIS_SCRIPT_PATH")" && pwd)
@NonLogicalDev
NonLogicalDev / james-bond-007-nightfire_nightfirepc.yaml
Last active June 7, 2025 01:33
James Bond 007 Nightfire - Lutris Install Script
name: James Bond 007 - Nightfire
game_slug: james-bond-007-nightfire
version: nightfirepc.com
slug: james-bond-007-nightfire
runner: wine
script:
install_complete_text: >
James Bond 007 - Nightfire has been installed successfully.
You can now launch the game from your library.
#!/bin/bash
DEST=$1;
shift
for stow_path in "$@"; do
abs_stow_path_p=$(realpath "$stow_path")
abs_stow_path_l=$(realpath -s "$stow_path")
dst_stow_path=${DEST}${abs_stow_path_l}
@NonLogicalDev
NonLogicalDev / .remote.vimrc
Last active April 30, 2025 17:44
Micro (N)VIMRC: A minimal sane configuration for debugging on remote hosts.
" Set encoding
set encoding=utf-8
" Enable syntax highlighting
syntax enable
" Set/Create directory for swap files
set directory=$HOME/.cache/vim/swap//
" Create swap directory if it doesn't exist
if !isdirectory(&directory)
@NonLogicalDev
NonLogicalDev / to_gif.sh
Last active February 8, 2025 02:00
FFMPEG: Convert to GIF.sh
#!/bin/bash
cnv_to_gif() {
local usage="Usage: $0 [--fps <fps>] [--wsize <width>] [--hsize <height>] [--start <timestamp>] [--end <timestamp>] <input> [<output>]"
local in_f="" out_f="" fps=15 wsize="500" hsize="-1" start="00:00:00" end="00:00:00"
while [[ $# -gt 0 ]]; do
case "$1" in
--fps) fps="$2"; shift 2;;
--wsize) wsize="$2"; shift 2;;
@NonLogicalDev
NonLogicalDev / README.md
Last active May 31, 2025 08:18
Fix up KDE apps distributed as flatpacks being unable to open Remote files (ex: Samba shares) from Dolphin (File Explorer)

KDE Flatpak Remote File Fix

Context: Fedora/Bazzite/Kinoite/universal-blue/KDE/Flatpacks

The Problem

When using KDE applications (like Okular or Gwenview) installed as Flatpaks in Fedora KDE Bazzite or other containerized Linux distributions, they may fail to open remote files (like those on Samba shares) when launched from Dolphin File Explorer.

Example error from Okular:

Could not open smb://... Reason: Unable to create KIO worker. Unknown protocol 'smb'.
@NonLogicalDev
NonLogicalDev / .config__gtk-3.0__gtk.css
Created June 9, 2024 20:41
GTK Adjust top bar size
/* window.ssd headerbar.titlebar { */
/* padding-top: 4px; */
/* padding-bottom: 4px; */
/* min-height: 0; */
/* } */
/* */
/* window.ssd headerbar.titlebar button.titlebutton { */
/* padding: 0px; */
/* min-height: 0; */
/* min-width: 0; */
@NonLogicalDev
NonLogicalDev / 01.input.go
Created June 26, 2023 22:00
Go Imports compare
//go:build ignore
// (before 1) [package doc comment]
package main
// (before 2) [this is a general comment]
// (group 1) this is a lonely single element grouping.
import (
"go/format"
#!/bin/bash -e
rm -rf repo*
ROOT_DIR="$(pwd)"
mkdir repo-origin
export GIT_PAGER=cat
(
cd repo-origin
@NonLogicalDev
NonLogicalDev / gist:2fad55f52c26dcd633966c69dd483955
Created September 27, 2022 17:33
Enable IntelliJ Experimental UI
--- /Users/USER/Library/Application Support/JetBrains/IntelliJIdea2022.2/before.txt 2022-09-27 10:30:08.000000000 -0700
+++ /Users/USER/Library/Application Support/JetBrains/IntelliJIdea2022.2/jba_config/ide.general.xml 2022-09-27 10:31:36.000000000 -0700
@@ -1,34 +1,36 @@
<application>
<component name="GeneralSettings">
<option name="autoSaveIfInactive" value="true" />
<option name="confirmExit" value="false" />
<option name="confirmOpenNewProject2" value="0" />
<option name="inactiveTimeout" value="5" />
<option name="processCloseConfirmation" value="TERMINATE" />