Skip to content

Instantly share code, notes, and snippets.

View michaelfortunato's full-sized avatar
:shipit:
Thinking about groups

Michael Fortunato michaelfortunato

:shipit:
Thinking about groups
View GitHub Profile
@cameronr
cameronr / snacks_tab_picker.lua
Last active December 8, 2025 00:44
Snacks.nvim tab picker
local Snacks = require('snacks')
local M = {}
local function get_tabs()
local tabs = {}
local tabpages = vim.api.nvim_list_tabpages()
for i, tabpage in ipairs(tabpages) do
local wins = vim.api.nvim_tabpage_list_wins(tabpage)
local cur_win = vim.api.nvim_tabpage_get_win(tabpage)
#let typ(body) = html.elem(
"typ",
{
// distinguish parbreak from <p> tag
show parbreak: it => html.elem("typParbreak", "")
show linebreak: it => html.elem("typLinebreak", "")
show strong: it => html.elem("typStrong", it.body)
show emph: it => html.elem("typEmph", it.body)
show highlight: it => html.elem("typHighlight", it.body)
@OXY2DEV
OXY2DEV / fancy_lsp_hover.md
Last active November 8, 2025 09:30
A slightly fancier LSP hover for Neovim

✏️ Overview

Note

A more bleeding-edge version of this is available here.

A pretty simple custom LSP hover window that tries to solve the issues I face with the built-in one.

showcase_1 showcase_2

@johndturn
johndturn / launchd-for-services.md
Last active November 20, 2025 13:27
Overview of using launchd to set up services on a macOS machine.

launchd - Script Management in macOS

What is it?

  • Used on macOS for managing agents and daemons and can be used to run scripts at specified intervals
    • macOS's competitor to cron, along with other things
  • Runs Daemons and Agents

What is a Daemon?

@webarchitect609
webarchitect609 / terminal.sh
Last active November 7, 2025 19:14
Git: disable GPG signing for current repo only.
# Write local
git config --local commit.gpgsign false
# Read local (if never set, can be an empty value)
git config --local commit.gpgsign
@inscapist
inscapist / keybindings.md
Last active June 11, 2023 14:08
VSCode omni-navigation with ctrl-hjkl (window navigation), ctrl-n/p (list navigation), cmd-hjkl (tab navigation)
[
  // ===================================================
  // window navigation
  {
    "key": "ctrl+h",
    "command": "workbench.action.navigateLeft"
  },
  {
    "key": "ctrl+l",
@armand1m
armand1m / .skhdrc
Last active July 24, 2025 13:47
⚙️ My yabai and skhd configuration files.
# open terminal
cmd - return : open -n -a "Terminal"
# open chrome
cmd + shift - return : open -n -a "Google Chrome"
# moves focus between windows in the current focused display
alt - h : yabai -m window --focus west
alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
@lisawolderiksen
lisawolderiksen / git-commit-template.md
Last active December 3, 2025 01:34
Use a Git commit message template to write better commit messages

Using Git Commit Message Templates to Write Better Commit Messages

The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the

@fnky
fnky / ANSI.md
Last active December 8, 2025 01:00
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active December 3, 2025 17:13
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th