Skip to content

Instantly share code, notes, and snippets.

@bigFin
bigFin / init.lua
Created March 10, 2025 17:33
init.lua chunk to fix nvim clipboard when on ssh
vim.opt.clipboard:append("unnamedplus")
-- OSC 52 clipboard provider
local function copy(lines, _)
local text = table.concat(lines, "\n")
vim.fn.chansend(vim.v.stderr, "\x1b]52;c;" .. vim.base64.encode(text) .. "\x07")
end
local function paste()
local content = vim.fn.getreg('"')
@bigFin
bigFin / everforest.json
Created December 30, 2024 18:46
Kicad everforest dark hard theme
{
"3d_viewer": {
"background_bottom": "rgb(43, 51, 46)",
"background_top": "rgb(34, 40, 36)",
"board": "rgba(43, 51, 46, 0.902)",
"copper": "rgb(215, 153, 33)",
"silkscreen_bottom": "rgb(211, 198, 170)",
"silkscreen_top": "rgb(211, 198, 170)",
"soldermask_bottom": "rgba(87, 110, 68, 0.831)",
"soldermask_top": "rgba(87, 110, 68, 0.831)",
#!/bin/bash
# Run a random XScreenSaver module in windowed mode
# Path to the XScreenSaver modules
module_path="/usr/lib/xscreensaver"
# Ensure the module path exists
if [ ! -d "$module_path" ]; then
echo "XScreenSaver module path not found: $module_path"
exit 1
@bigFin
bigFin / usb_reset.sh
Created December 29, 2024 03:35
reset all usb interfaces if devices are not being detected
#!/bin/bash
# Unload the USB related kernel modules
sudo modprobe -r ehci_hcd
sudo modprobe -r ohci_hcd
sudo modprobe -r uhci_hcd
# Reload the kernel modules to rescan the USB devices
sudo modprobe ehci_hcd
sudo modprobe ohci_hcd
#!/bin/bash
# Define the systemd service file path
SERVICE_FILE="$HOME/.config/systemd/user/xscreensaver.service"
# Ensure the systemd user directory exists
mkdir -p "$(dirname "$SERVICE_FILE")"
# Write the service file content
cat <<EOF > "$SERVICE_FILE"