Skip to content

Instantly share code, notes, and snippets.


Thore Strassburg weilbith

  • Brainbot Technologies
  • Berlin
View GitHub Profile
weilbith /
Last active Mar 6, 2021
Show image from URL in TMux pane with Ueberzeugt
download_path=$(mktemp --suffix "tmux-preview-image")
max_width=$(tmux display -p '#{pane_width}')
max_height=$(tmux display -p '#{pane_height}')
curl --output $download_path --silent $image_url
source $(ueberzug library)
weilbith / tap_dance_simulations.c
Created Dec 20, 2019
QMK keyboard firmware - simulate MT with tap dance
View tap_dance_simulations.c
#include "tap_dance_simulations.h"
typedef enum {
// TODO: Think about tap-hold case
} td_state_t;
weilbith / keymap.c
Created Nov 1, 2019
QMK firmware Mod-Tab simulation with Tab-Dance for One-Shot-Modifier feature
View keymap.c
typedef enum {
} td_state_t;
static td_state_t td_state;
int cur_dance (qk_tap_dance_state_t *state);
void gui_control_finished (qk_tap_dance_state_t * state, void *user_data);
void gui_control_reset (qk_tap_dance_state_t* state, void *user_data);
weilbith / python.snippets
Created Mar 22, 2019
Secure empty lines before and after completed snippets with UltiSnips
View python.snippets
global !p
def on_jump(snippet, positions, function, arguments=None):
if not isinstance(positions, list):
positions = [positions]
for position in positions:
if position == "last":
position = len(snippet.tabstops) - 1
if position == snippet.tabstop:
weilbith / autoload_utils_layout.vim
Last active Mar 12, 2019
Dark Powered Vim - Fix The Broken Window Layout (file names are using '_' to simulate a '/', leveraging Vim's autload functionalities)
View autoload_utils_layout.vim
" Standard shape values when fail to retrieve a global variable.
let s:standard_width = 30
let s:standard_height = 10
" List of all windows, which should have a fixed size and/or position.
let g:layout_fixed_windows = [
\ {
\ 'buffer_name': 'Scratch',
weilbith / autoload_utils_location.vim
Last active Jul 26, 2019
Vim - Dynamic Location Lists
View autoload_utils_location.vim
" Cache a possibly filled location list for a hiding buffer.
" Check if there is a non-empty list for the current buffer.
" Stores the list to the cache and empty the original one.
" The location window will be closed.
" Arguments:
" buffer - buffer to create the cache for
function! utils#location#cache_location_list(buffer) abort
if get(g:, 'dynamic_location_list_disable', v:false) | return | endif