Skip to content

Instantly share code, notes, and snippets.

View ch1c0t's full-sized avatar

Anatoly Chernov ch1c0t

View GitHub Profile
@travisjupp
travisjupp / zle-widgets-with-default-keybindings.md
Last active August 30, 2025 11:58
Short summary of all standard ZLE widgets with keybindings

Zsh ZLE Standard Widgets — Default Key Bindings (Zsh 5.9) and Bash Readline Equivalents

This list gives all standard widgets (including those with and without default keybindings), a short summary, and the default key(s) for each, as found in Zsh 5.9 (emacs and vi modes).
Where available, the equivalent Bash Readline function and default keybinding are shown as Ctrl-X (Bash Readline).
Widgets with no default keybinding are listed without a key.
Third-party/community/user widgets (e.g. fzf, npm, z4h, bash*) are also listed when requested, but are not present in default zsh.


  • accept-and-hold

Namespaces 101

Introduction

Ruby has recently merged namespaces as an experimental feature that is disabled by default, as of this writing.

This is a non-trivial development driven by @matz himself, and mainly implemented by @tagomoris, who just became a Ruby committer (🎉).

The feature has been cooking for a long time, with a first ticket opened a couple of years ago (#19744) and a revised one opened just last week (#21311).

@majamin
majamin / gentoo_kde_install.adoc
Last active September 30, 2025 00:28
Notes on installing KDE on Gentoo

KDE on Gentoo (December, 2024)

Preamble

NOTE

If you’re reading the plain text or Asciidoc version, see the

@sina-mansour
sina-mansour / blender_visualization.py
Created September 23, 2024 04:39
Example scripts linking Python and Blender for neuroimaging visualization
import bpy
import math
import numpy as np
import nibabel as nib
import matplotlib.pyplot as plt
from Connectome_Spatial_Smoothing import CSS as css
from cerebro import cerebro_brain_utils as cbu
from cerebro import cerebro_brain_viewer as cbv
@AndrewRadev
AndrewRadev / markdown_open_link.vim
Last active September 29, 2024 20:07
Open a markdown link under the cursor (proof-of-concept)
@AndrewRadev
AndrewRadev / pophelp.vim
Last active September 29, 2024 20:07
Open Vim help in a resizable, movable popup window
" Save as ~/.vim/plugin/pophelp.vim
let s:popup = 0
command! -range=0 -nargs=* -complete=help
\ Pophelp call s:Open(<q-args>, <count>)
command! Popclose call s:Close()
function! s:Open(topic, count) abort
if a:topic == ''
@AndrewRadev
AndrewRadev / netrw_icons.vim
Last active June 13, 2025 23:10
Render icons in netrw
" Save as ~/.vim/ftplugin/netrw_icons.vim
if exists('b:netrw_icons_loaded')
finish
endif
let b:netrw_icons_loaded = 1
autocmd TextChanged <buffer> call s:NetrwAddIcons()
if empty(prop_type_get('netrw_file_icon', {'bufnr': bufnr('%')}))
@Beyarz
Beyarz / README.md
Last active June 2, 2025 18:56
Comprehensive guide to get working environment with MRuby

Getting started

Compile on Windows

  1. Install msys2 (because we need mingw64, gcc and libws2_32.a)
  2. Open msys2 or mingw64 and run pacman -S mingw64/mingw-w64-x86_64-mruby
  3. Get MRuby and extract the folder
  4. Run make inside the folder mruby-3.3.0, there will be a new folder called /build after the compilation, we need the file at /build/host/lib/libmruby.a
  5. Compile using the following command gcc main.c -I"mruby-3.3.0/include" "mruby-3.3.0/build/host/lib/libmruby.a" "C:\msys64\mingw64\lib\libws2_32.a" -lm -o main or substitue "C:\msys64\mingw64\lib\libws2_32.a" with -lws2_32
  6. Run the compiled binary main.exe
@AndrewRadev
AndrewRadev / textobj_url.vim
Created February 9, 2024 20:48
URL text object
onoremap <silent> iu :<c-u>call <SID>UrlTextObject()<cr>
xnoremap <silent> iu :<c-u>call <SID>UrlTextObject()<cr>
onoremap <silent> au :<c-u>call <SID>UrlTextObject()<cr>
xnoremap <silent> au :<c-u>call <SID>UrlTextObject()<cr>
function! s:UrlTextObject()
let saved_view = winsaveview()
let saved_end_pos = getpos("'b")
defer setpos("'e", saved_end_pos)