Skip to content

Instantly share code, notes, and snippets.

View BrunoKrugel's full-sized avatar

Bruno Krugel BrunoKrugel

View GitHub Profile
@xzbdmw
xzbdmw / repro.lua
Last active March 27, 2025 01:46
Telescope dynamic height
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
type: custom:button-card
name: Living Room
icon: mdi:sofa
tap_action:
action: navigate
navigation_path: '#livingroom'
entity: sensor.living_room_temp_and_hum
custom_fields:
btn:
card:
type: custom:button-card
entity: media_player.living_room_hifi
show_entity_picture: true
show_name: false
show_icon: false
custom_fields:
info:
card:
type: vertical-stack
cards:
@nikolovlazar
nikolovlazar / keybindings.json
Last active April 21, 2025 22:25
VSCode key bindings to navigate like Neovim
[
// Navigation
{
"key": "ctrl-h",
"command": "workbench.action.navigateLeft"
},
{
"key": "ctrl-l",
"command": "workbench.action.navigateRight"
},
@CaptainVincent
CaptainVincent / README.md
Last active February 20, 2025 00:23
Improve your vscode quickinput-widget

Customize your quickinput-widget

This is a small tool designed to emulate the Sublime style Command Palette as follows.

Screenshot

It requires the use of a specific extension to load the js file from this gist.

I'm using the APC extension, and the usage is as follows.

@Lamarcke
Lamarcke / lualine.lua
Last active July 23, 2024 17:52
Lualine config for LSP clients, formatters and linters
-- Returns a string with a list of attached LSP clients, including
-- formatters and linters from null-ls, nvim-lint and formatter.nvim
local function get_attached_clients()
local buf_clients = vim.lsp.get_active_clients({ bufnr = 0 })
if #buf_clients == 0 then
return "LSP Inactive"
end
local buf_ft = vim.bo.filetype
@romainl
romainl / vanilla-surround.md
Last active March 16, 2025 10:41
Poor man's Surround

Poor man's Surround

The following shows how to replicate some of Surround's features if you don't happen to have it installed.

NOTE: We only dealt with the simplest cases, here, and the convoluted nature of some of these commands shows how well designed and useful that plugin is. And let's not talk about all the corner cases it handles.

Install it, it's worth it.

The list

@vinicioslc
vinicioslc / Github Actions Digital Ocean Deploy.md
Last active October 21, 2024 22:03
Como fazer deploy na digital ocean com github actions
  1. Primeiro crie uma chave ssh para deploy que será salva no github actions para ter acesso a maquina da digital ocean 1.1 Crie utilizando esses steps https://docs.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent
  2. Adicione ssh.publica no servidor no arquivo authorized_keys
  3. Adiciona o ssh ao repositório do github nas settings do repositório 3.1 Caso possua pacotes privados do github não esqueça de configrar o .npmrc na pasta do package.json setando token de leitura para instalação de packages do repositório do gitbub

3.3 Adicione as configurações de conexão ssh utilizando as enviroments do repositório seguindo padrão de prefixo no nome SSH SSH_HOST -> ip da maquina SSH_PORT -> porta ssh 22

@troyfontaine
troyfontaine / 1-setup.md
Last active April 24, 2025 01:56
Signing your Git Commits on MacOS

Methods of Signing Git Commits on MacOS

Last updated March 13, 2024

This Gist explains how to sign commits using gpg in a step-by-step fashion. Previously, krypt.co was heavily mentioned, but I've only recently learned they were acquired by Akamai and no longer update their previous free products. Those mentions have been removed.

Additionally, 1Password now supports signing Git commits with SSH keys and makes it pretty easy-plus you can easily configure Git Tower to use it for both signing and ssh.

For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing your commits with GPG.