Skip to content

Instantly share code, notes, and snippets.

View akiva's full-sized avatar

Akiva Levy akiva

View GitHub Profile
@romainl
romainl / path.md
Last active June 23, 2024 19:04
Off the beaten path

Off the beaten path

What is &path used for?

Vim uses :help 'path' to define the root directories from where to search non-recursively for files.

It is used for:

  • gf, gF, <C-w>f, <C-w>F, <C-w>gf, <C-w>gF,
  • :find, :sfind, :tabfind,
@rjhansen
rjhansen / keyservers.md
Last active April 14, 2024 12:28
SKS Keyserver Network Under Attack

SKS Keyserver Network Under Attack

This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.

Terminological Note

"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.

Who am I?

@sdondley
sdondley / tmux split-window subcommand.md
Last active June 10, 2024 00:21
Super Guide to the split-window tmux Subcommand (and Beyond)

Super Guide to the split-window tmux Subcommand (and Beyond)

Guide overview

tmux, like other great software, is deceptive. On the one hand, it's fairly easy to get set up and start using right away. On the other hand, it's difficult to take advantage of tmux's adanced features without spending some quality alone time with the manual. But the problem with manuals is that they aren't geared toward beginners. They are geared toward helping seasoned developers and computer enthusiasts quickly obtain the

config.load_autoconfig()
config.bind('R', 'config-source ;; message-info config-reloaded')
# saner defaults
# --------------
c.auto_save.session = True
c.aliases['x'] = 'quit --save'
c.completion.shrink = False
c.input.insert_mode.auto_load = True
c.confirm_quit = ["downloads"]
@romainl
romainl / vanilla-linter.md
Last active May 6, 2024 01:48
Linting your code, the vanilla way

Linting your code, the vanilla way

You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.

Defining makeprg

autocmd FileType <filetype> setlocal makeprg=<external command>

This autocommand tells Vim to use <external command> when invoking :make % in a <filetype> buffer. You can add as many similar lines as needed for other languages.

@romainl
romainl / colorscheme-override.md
Last active May 27, 2024 00:17
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.

radare2

load without any analysis (file header at offset 0x0): r2 -n /path/to/file

  • analyze all: aa
  • show sections: iS
  • list functions: afl
  • list imports: ii
  • list entrypoints: ie
  • seek to function: s sym.main
@eatonphil
eatonphil / functions.c
Last active May 15, 2024 02:12
Introduction to "Fun" C (using GCC)
/**
* This are a collection of examples for C 201.
* These combine concepts you may or may not be
* familiar with and are especially useful for
* students new to C. There is a lot of really
* cool stuff you can do in C without any cool
* languages.
*
* This is file in particular is an introduction
* to fun function usage in C.
@foca
foca / 0_README.md
Last active May 10, 2023 20:55
A Makefile for developing a ruby gem

A Makefile for building ruby gems

This Makefile aids in developing a ruby gem. It's pretty opinionated to my workflow, but it might be useful to you, so here it goes.

  1. Assumes you use of [gs][gs] (or [gst][gst]) for managing gemsets.
  2. Assumes you use [dep][dep] for installing dependencies. Because fuck Bundler.
  3. Assumes the directory in which the source code is located is named after the gem. So basename $(dirname $(pwd)) would return foo
@staltz
staltz / introrx.md
Last active June 29, 2024 15:58
The introduction to Reactive Programming you've been missing