Skip to content

Instantly share code, notes, and snippets.

View pandasoli's full-sized avatar
🪴

Eli Soli pandasoli

🪴
View GitHub Profile
@pandasoli
pandasoli / getch.c
Last active May 31, 2023 17:10
Get char function
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#define BUFFER_SIZE 10
/*
* If you desire track the mouse, active and desactive the mouse tracking.
*
* write(STDOUT_FILENO, "\e[?9h", 5); // active
@pandasoli
pandasoli / wherexy.py
Last active May 30, 2023 01:54
A function to get the current row and column of the cursor in the console
import re, sys, termios, tty
def getpos():
buff = ''
stdin = sys.stdin.fileno()
tattr = termios.tcgetattr(stdin)
try:
tty.setcbreak(stdin, termios.TCSANOW)
sys.stdout.write('\033[6n')
@pandasoli
pandasoli / config.lua
Last active September 14, 2023 20:31
My LunarVim config file
-- General --
lvim.colorscheme = 'nord'
lvim.transparent_window = true
lvim.builtin.nvimtree.setup.view.side = 'right'
-- Restore cursor when close vim
vim.api.nvim_create_autocmd('VimLeave', {