Skip to content

Instantly share code, notes, and snippets.

View sashalikesplanes's full-sized avatar

Alexander Kiselev sashalikesplanes

View GitHub Profile
@sashalikesplanes
sashalikesplanes / config.lua
Last active October 24, 2023 15:06
Harpoon X Bufferline Neovim
-- This example shows how to integrate Bufferline with Harpoon
-- The goal is to get bufferline to show only the files marked by harpoon, with the correct number
-- I use <C-w>{1..N} to navigate between the harpoon buffers, my harpoon config is also included
-- I have also setup an autocommand in order to open all the harpoon buffers when launching neovim, it is at the bottom of the file
-- NOTE: this guide relies on you using the lazy package manager
-- bufferline.nvim
-- helper functions:
local function get_marked_buffers()
local mark = require("harpoon.mark")
@sashalikesplanes
sashalikesplanes / gist:91f8e41b7f3a0b10fe7b4595158baf48
Created November 11, 2022 12:46
A func for calculating influence
#include <assert.h>
#include <math.h>
#include <stdio.h>
float calculateTrigDistance(int x1, int y1, int z1, int x2, int y2, int z2) {
// Calculate the trig distance between two 3D points
float trigDistance =
pow(pow((x2 - x1), 2.0) + pow((y2 - y1), 2.0) + pow((z2 - z1), 2.0), 0.5);
return trigDistance;