Skip to content

Instantly share code, notes, and snippets.

View budRich's full-sized avatar

Nils Kvist budRich

View GitHub Profile
@valignatev
valignatev / xcb_opengl.c
Last active April 27, 2026 15:18
setting up and using modern OpenGL 4.5 core context on X11 with EGL and xcb, without xlib or glx
// This is @mmozeiko's libx + EGL example ported to xcb + EGL
// Original code: https://gist.github.com/mmozeiko/911347b5e3d998621295794e0ba334c4
// It requires EGL_EXT_platform_xcb extension, so if your system is circa the end of 2021 or newer you should be fine.
// Also, I don't know if it works on nvidia. LMK if you test it
// example how to set up OpenGL core context on X11 with EGL
// and use basic functionality of OpenGL 4.5 version
// to compile on Ubuntu first install following packages: build-essential libxcb1-dev libgl-dev libegl-dev, then run:
#!/usr/bin/bash
# Goal: move workspace $1 to the currently focused output, move the workspace on the current output
# to the output where $1 was.
# The workspace we want to end up on
dest_ws=$1
# The output where the destination ws resides
output_of_dest_ws=$(i3-msg -t get_workspaces | jq .[] | jq -r 'select(.name == "'$dest_ws'").output')
# The currently focused output

The Freenode resignation FAQ, or: "what the fuck is going on?"

IMPORTANT NOTE:

It's come to my attention that some people have been spamming issue trackers with a link to this gist. While it's a good idea to inform people of the situation in principle, please do not do this. By all means spread the word in the communities that you are a part of, after verifying that they are not aware yet, but unsolicited spam is not helpful. It will just frustrate people.

Update 3 (May 24, 2021)

A number of things have happened since the last update.

@probonopd
probonopd / Wayland.md
Last active May 4, 2026 11:16
Think twice about Wayland. It breaks everything!

Think twice before abandoning X11. Wayland breaks everything!

tl;dr: Wayland is not "the future", it is merely an incompatible alternative to the established standard with a different set of priorities and goals.

Wayland breaks everything! It is binary incompatible, provides no clear transition path with 1:1 replacements for everything in X11, and is even philosophically incompatible with X11. 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 e

@gwenzek
gwenzek / remote_subl.md
Last active July 12, 2024 11:06
Sublime Text for remote development

This steps should help working remotely with Sublime Text. They are meant to be incremental, just setting up SFTP will go a long way.

My workflow

I have all my code on my laptop, edit locally and automatically push the files to my server. I never edit "tracked" files on the server directly. I sometimes modify untracked files on the server using rmate (see below).

  • SC1000 $ is not used specially and should therefore be escaped.
  • SC1001 This \o will be a regular 'o' in this context.
  • SC1003 Want to escape a single quote? echo 'This is how it'\''s done'.
  • SC1004 This backslash+linefeed is literal. Break outside single quotes if you just want to break the line.
  • SC1007 Remove space after = if trying to assign a value (or for empty string, use var='' ... ).
  • SC1008 This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.
  • SC1009 The mentioned parser error was in ...
  • SC1010 Use semicolo
@LnLcFlx
LnLcFlx / archlogo.txt
Last active April 8, 2026 20:09
Arch Linux logo using unicode block characters
\033[38;2;23;147;209m ▄
▟█▙
▟███▙
▟█████▙
▟███████▙
▂▔▀▜██████▙
▟██▅▂▝▜█████▙
▟█████████████▙
▟███████████████▙
▟█████████████████▙
@M4he
M4he / pcmanfm_hide_menubar.patch
Last active March 11, 2025 21:56
PCManFM patch for hiding menubar toggle (GTK2 version), accessed via 'View' menu or pressing Ctrl+M
Description: Make menubar visibility optional
Introduces a new toggle for hiding the menubar in the 'View' menu
as well as via Ctrl+M.
pcmanfm (1.3.1-1)
--- pcmanfm-1.3.1.orig/src/app-config.c
+++ pcmanfm-1.3.1/src/app-config.c
@@ -527,6 +527,7 @@ static void fm_app_config_init(FmAppConf
cfg->autorun_choices = g_hash_table_new_full(g_str_hash, g_str_equal,
g_free, _free_archoice);
@mutcianm
mutcianm / set-interface
Last active December 1, 2025 10:29
Simple bash script to globally toggle dark/light look and feel
#!/bin/bash
if [[ $1 == "dark" ]]; then
UI_THEME_GTK="Mojave-dark"
UI_THEME_QT="KvMojave"
UI_ICONS="Faenza-Ambiance"
VIM_BG="dark"
elif [[ $1 == "light" ]]; then
UI_THEME_GTK="Mojave-light"
UI_THEME_QT="KvMojaveLight"
@nicerobot
nicerobot / ssh-tgzx
Last active February 15, 2026 02:53
Self-extracting, encrypted tarballs using SSH public keys from GitHub. Because https://ssh-vault.com is awesome but it requires an installation.
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
(( ${#} >= 3 )) || { echo "usage: $(basename "${0}") github-username archive-file [files | directories]" >&2; exit 1; }
username="${1}"
outfile="${2}"
shift 2