Skip to content

Instantly share code, notes, and snippets.

View lopesivan's full-sized avatar
🚧
Working from home

Mr. Ivan lopesivan

🚧
Working from home
View GitHub Profile

O bug

LuaJIT 2.0.1 -- Copyright (C) 2005-2013 Mike Pall. http://luajit.org/
JIT: ON CMOV SSE2 SSE3 SSE4.1 fold cse dce fwd dse narrow loop abc sink fuse
> require "numlua"
error loading module 'numlua' from file '/usr/local/lib/lua/5.1/numlua.so':
        libhdf5_serial.so.10: cannot open shared object file: No such file or directory
stack traceback:
 [C]: at 0x55ec04e09c00
local function git_menu()
local hint = [[
_a_: Git add _C_: Commit
_b_: Checkout branch _0_: cherry-pick
_c_: Checkout commit _1_: stash
_d_: Diff _2_: stash save
_j_: Next Hunk _3_: stash list
_k_: Prev Hunk _4_: stash pop
_l_: Blame _5_: init
_o_: Status _6_: bare
@lopesivan
lopesivan / csharpier.lua
Created November 7, 2023 20:16
lua/config/csharpier.lua
local Path = require "plenary.path"
local Job = require "plenary.job"
local lspconfig_util = require "lspconfig.util"
local cached_configs = {}
local root_finder = lspconfig_util.root_pattern ".git"
local csharpier_finder = function(path)
if cached_configs[path] == nil then
@lopesivan
lopesivan / csharpier.lua
Created November 7, 2023 20:16
after/plugin/csharpier.lua
if vim.fn.executable "dotnet-csharpier" == 0 then
return
end
local group = vim.api.nvim_create_augroup("CsharpierAuto", { clear = true })
vim.api.nvim_create_autocmd("BufWritePost", {
group = group,
pattern = { "*.cs" },
callback = function()
#include <stdio.h>
struct speed {
int x;
int y;
};
void aumenta(struct speed *speed);
void aumenta(struct speed *speed){
@lopesivan
lopesivan / entrypoint.sh
Created July 18, 2022 06:43
Docker no-root engine
#!/bin/bash
if [ -z "$GID" -o -z "$UID" -o -z "$USER" -o -z "$GROUP" ]; then
echo Running as root
exec "$@"
else
if [ ! $(getent group $GROUP) -a ! $(getent group $GID) ]; then
echo Creating group $GROUP with id $GID
groupadd -g $GID $GROUP
else
echo Group name $GROUP or id $GID already exist
@lopesivan
lopesivan / entrypoint.sh
Created July 18, 2022 06:06
Docker no-root engine
#!/bin/bash
if [ -z "$GID" -o -z "$UID" -o -z "$USER" -o -z "$GROUP" ]; then
echo Running as root
exec "$@"
else
if [ ! $(getent group $GROUP) -a ! $(getent group $GID) ]; then
echo Creating group $GROUP with id $GID
groupadd -g $GID $GROUP
else
echo Group name $GROUP or id $GID already exist
@lopesivan
lopesivan / customize-bash-it.sh
Last active July 15, 2022 05:42
Customize bash-it
#!/usr/bin/env bash
BASH_IT="$(brew --prefix)/opt/bash-it"
source "$BASH_IT"/bash_it.sh
bash-it enable alias developer general mutt redis tmux vim wine xclip
bash-it enable completion flutter bash-it brew cargo cht docker-compose docker-machine git_flow github-cli iprj tldr tmuxinator ttjava wd xp
bash-it enable plugin android arduino brew dart ghcup goenv gradle groovy jbang jenv luaenv ndenv pandoc perl5 pyenv rakudobrew rbenv roo rustup
@lopesivan
lopesivan / dropchrome
Created May 18, 2022 02:26
i3wm hide/show google-chrome
#!/bin/sh
if xwininfo -tree -root | grep -q "chrome"
then
echo "Window detected."
if xdo id -a "Google Chrome" >&- 2>&-;
then
map_state=$(xwininfo -all -id `xdo id -a "Google Chrome"` | grep "Map State"| cut -d\s -f2)
@lopesivan
lopesivan / dropqutebroser
Created May 18, 2022 02:26
i3wm hide/show qutebrowser
#!/bin/sh
if xwininfo -tree -root | grep "qutebrowser";
then
echo "Window detected."
map_state=`xwininfo -all -id $(xdo id -N qutebrowser) | grep "Map State"| cut -d\s -f2`
# if [ "$map_state" = 'UnMapped' ];
if [ "$map_state" = 'Viewable' ];
then