Skip to content

Instantly share code, notes, and snippets.

View rootex-'s full-sized avatar
:octocat:

Alex Dunayevsky rootex-

:octocat:
View GitHub Profile
@ADIOP55550
ADIOP55550 / .ideavimrc
Last active September 27, 2025 08:41
Helix-like config for IdeaVim
" Based on comment by mchlstckl
" https://www.reddit.com/r/HelixEditor/comments/14aqztf/comment/jocslxs/
" Check the history of this gist for a changelist
" Read NOTES and WARNINGS lower
" Must be done first to tell other plugins that <space> is the leader key
let mapleader=" "
@hirrolot
hirrolot / tagless-final.rs
Last active December 2, 2024 20:28
Tagless-final encoding of a simple arithmetic language in Rust
trait Interp {
type Repr<T>;
fn lit(i: i32) -> Self::Repr<i32>;
fn add(a: Self::Repr<i32>, b: Self::Repr<i32>) -> Self::Repr<i32>;
}
struct Eval;
impl Interp for Eval {
@eyeseast
eyeseast / python.md
Last active May 25, 2025 08:27
How to set up Python in 2022

I have an updated version of this on my blog here: https://chrisamico.com/blog/2023-01-14/python-setup/.

Python

This is my recommended Python setup, as of Fall 2022. The Python landscape can be a confusing mess of overlapping tools that sometimes don't work well together. This is an effort to standardize our approach and environments.

Tools and helpful links:

  • Python docs:Β https://docs.python.org/3/
  • Python Standard Library:Β Β - Start here when you're trying to solve a specific problem
@lkhphuc
lkhphuc / nvim_highlight_update.md
Last active September 1, 2025 05:07
A simple utility function to override and update any colorscheme in Neovim.

I like to have my neovim to bold the language keywords, italicize the comments, or both italicize and bold all the builtin functions, type or constants etc. And I want this to be consistent across colorschemes.

In vim/neovim, to update a highlight group it is as simple as highlight HighlightGroupToModified gui=bold,italic,underline. But this is problematic if the HighlightGroupToModified is defined as a link to other highlight group. For example highlight TSInclude might be linked to Include by your colorscheme, so executing hi TSInclude gui=bold will apply bold to TSInclude but wipe out any foreground and background color information that was originally defined by linking to Include highlight group.

Since every colorschemes can arbitrarily choose to define a highlight group explicitly or by linking, adding hi TSConstant gui=bold to your config are bound to break when you switch colorschemes. A manual approach is to recursively go down the linking chain defined by colorscheme, e.g TSConstant

@sts10
sts10 / rust-command-line-utilities.markdown
Last active October 23, 2025 02:55
A curated list of command-line utilities written in Rust

A curated list of command-line utilities written in Rust

Note: I have moved this list to a proper repository. I'll leave this gist up, but it won't be updated. To submit an idea, open a PR on the repo.

Note that I have not tried all of these personally, and cannot and do not vouch for all of the tools listed here. In most cases, the descriptions here are copied directly from their code repos. Some may have been abandoned. Investigate before installing/using.

The ones I use regularly include: bat, dust, fd, fend, hyperfine, miniserve, ripgrep, just, cargo-audit and cargo-wipe.

  • atuin: "Magical shell history"
  • bandwhich: Terminal bandwidth utilization tool
@JulianGR
JulianGR / Markdown cheatsheet obsidian.md
Last active September 13, 2025 10:01
Custom Markdown cheatsheet for the note-taking app Obsidian

useful shortcuts

  • Ctrl + N: new note
  • Ctrl + E: toggle edit mode
  • Ctrl + enter: toggle checkbox
  • Ctrl + shift + F: search among all files
  • Ctrl + P: command pannel
  • Ctrl + [ or ] : change indentation of a list item
  • Alt + click to make multiple cursos

Internal linking

@q-hung
q-hung / WIN10.MD
Last active October 16, 2025 16:06
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

@YumaInaura
YumaInaura / VIMIUM.md
Last active April 23, 2025 18:09
Vimium β€” Default keymap list used to Custom key mappings ( unmapAll and enable mappings you like )

Vimium β€” Default keymap list used to Custom key mappings

Shortcuts

# Navigating the page

map j scrollDown
map <c-e> scrollDown
map k scrollUp
@hjertnes
hjertnes / doom.txt
Created April 6, 2018 08:28
Doom Emacs Cheatsheet
SPC
SPC: find file
, switch buffer
. browse files
: MX
; EX
< switch buffer
` eval
u universal arg
x pop up scratch
@romainl
romainl / colorscheme-override.md
Last active August 26, 2025 09:26
The right way to override any highlighting if you don't want to edit the colorscheme file directly

The right way to override any highlighting if you don't want to edit the colorscheme file directly

Generalities first

Suppose you have weird taste and you absolutely want:

  • your visual selection to always have a green background and black foreground,
  • your active statusline to always have a white background and red foreground,
  • your very own deep blue background.