Skip to content

Instantly share code, notes, and snippets.

@probonopd
probonopd / Wayland.md
Last active June 6, 2025 19:05
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.


As 2024 is winding down:

@GetoXs
GetoXs / HP TPC-P001K - Fn inversion.ahk
Created August 16, 2020 11:48
Workaround for keyboard HP TPC-P001K Fn lock problem
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
#InstallKeybdHook
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; F1 key by default, Fn+F1 is now Mute/Unmute
VOLUME_MUTE::F1
F1::VOLUME_MUTE
@mg979
mg979 / import.vim
Last active March 8, 2024 18:30
Import Ultisnips snippets in vim-vsnip
" ========================================================================///
" Description: import UltiSnips snippets as VsCode snippets for vim-vsnip
" File: import.vim
" Author: Gianmaria Bajo <[email protected]>
" License: MIT
" Created: dom 09 agosto 2020 13:14:35
" Modified: dom 09 agosto 2020 15:33:32
" ========================================================================///
function! import#snippets(ask_confirm) abort
@PeterRincker
PeterRincker / diff.md
Last active September 5, 2024 04:12 — forked from romainl/diff.md
:DiffOrig but smarter

:DiffOrig but smarter

This is an enhanced version of the snippet provided under :help diff-original-file.

Where the original :DiffOrig only shows differences between the buffer in memory and the file on disk, :Diff can be used in two ways:

  • against the file on disk, like the original, with:

    :Diff
    
@SeniorMars
SeniorMars / java.vim
Last active December 3, 2024 08:13
Example vimrc for java development. https://youtu.be/ssmFzoZS2G8
filetype plugin indent on
syntax on "activates syntax highlighting among other things
set autoindent "indent base on previous and syntax
set backspace=indent,eol,start "Fixes the backspace
set foldmethod=indent "fold your code.
set hidden "work with multiple unsaved buffers.
set incsearch "highlights as you search
set ignorecase
set smartcase
set relativenumber number "sets line numbers
@romainl
romainl / git-jump
Last active March 10, 2025 22:59
git-jump hack that can be used FROM Vim
#!/bin/sh
usage() {
cat <<\EOF
usage: git jump <mode> [<args>]
Jump to interesting elements in an editor.
The <mode> parameter is one of:
diff: elements are diff hunks. Arguments are given to diff.
#!/usr/bin/env sh
set -- $(locale LC_MESSAGES)
yesptrn="$1"; noptrn="$2"; yesword="$3"; noword="$4"
parent_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P )
input_sink=$(pacmd stat |grep -o -P "(?<=Default source name: ).*")
output_sink=$(pacmd stat |grep -o -P "(?<=Default sink name: ).*")
echo "Input:" $input_sink
@bfrg
bfrg / quickfix-toggle.vim
Last active October 3, 2024 17:12
Toggle the quickfix and location-list windows and resize the quickfix window automatically
" Open/close/toggle the quickfix and location-list windows
" ------------------------------------------------------------------------------
" File: autoload/qf/window.vim
" ------------------------------------------------------------------------------
" Toggle quickfix or location-list window
function! qf#window#toggle(loclist = 0)
" Check if quickfix window is open in current tabpage, or if current
" window's location-list window is open
@madkoding
madkoding / pair-dual-boot-bluetooth.md
Last active June 6, 2025 15:42
Pairing bluetooth devices in dual boot with Linux Ubuntu and Windows 10/11

Pairing Bluetooth Devices in Dual Boot with Linux Ubuntu and Windows 10/11

Introduction

This guide provides updated instructions for pairing Bluetooth devices (such as keyboards or mice) in a dual-boot environment with Linux Ubuntu and Windows 10/11, incorporating community feedback and suggestions.

Instructions

1. Pair in Linux First

  • Pair your Bluetooth device in Linux. This is crucial to ensure the LinkKey remains consistent.
  • Note: Do not re-pair the device in Linux after completing the pairing in Windows.
@romainl
romainl / diff.md
Last active December 24, 2024 10:29
:DiffOrig but smarter

:DiffOrig but smarter

This is an enhanced version of the snippet provided under :help diff-original-file.

Where the original :DiffOrig only shows differences between the buffer in memory and the file on disk, :Diff can be used in two ways:

  • against the file on disk, like the original, with:

    :Diff