Skip to content

Instantly share code, notes, and snippets.

View elulcao's full-sized avatar
:octocat:
A bug is never just a mistake...

Daniel Carvallo elulcao

:octocat:
A bug is never just a mistake...
View GitHub Profile
@elulcao
elulcao / .tmux.conf
Last active May 27, 2023 03:31
tmux.conf favorite config
# Initial setup
unbind C-b # remap prefix from 'C-b' to 'C-a'
set -g prefix C-Space
bind-key C-Space send-prefix
set -g mouse on # toggle mous
set -g mode-keys vi # Use Vi key bindings instead of emacs.
set -g status-keys vi
set -g base-index 1 # start window numbering at 1
@elulcao
elulcao / .vimrc
Last active October 15, 2022 16:46
vimrc favorite configuration
" vim-bootstrap 2022-08-30 02:14:37
"*****************************************************************************
"" Vim-Plug core
"*****************************************************************************
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
if has('win32')&&!has('win64')
let curl_exists=expand('C:\Windows\Sysnative\curl.exe')
else
let curl_exists=expand('curl')
@elulcao
elulcao / listFiles.go
Last active October 15, 2022 17:03
goroutine and messages
package listfiles
import (
"fmt"
"os"
"regexp"
"strings"
"sync"
)
@elulcao
elulcao / .zshrc
Last active November 24, 2021 00:00
zshrc favorite configuration
# elulcao
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
setopt INC_APPEND_HISTORY_TIME # separate concurrent histories across shells until session closes
setopt EXTENDED_HISTORY # save each command’s beginning timestamp
setopt HIST_EXPIRE_DUPS_FIRST # the oldest history event that has a duplicate to be lost before losing a unique event from the lis
setopt HIST_IGNORE_DUPS # do not enter command lines into the history list if they are duplicates of the previous event
setopt HIST_IGNORE_ALL_DUPS # the older command is removed from the list
@elulcao
elulcao / .htoprc
Created November 18, 2021 16:21
htoprc favorite configuration
# elulcao
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
# vim ~/.config/htop/htoprc
fields=50 0 48 17 18 38 39 40 2 46 47 49 1
sort_key=111
sort_direction=1
hide_threads=1
hide_kernel_threads=1
@elulcao
elulcao / . gitconfig
Last active December 29, 2021 22:34
gitconfig favorite configuration
[user]
email = elulcao@icloud.com
name = elulcao
signingkey =
[core]
excludesfile = ~/.gitignore_global
editor = vim
precomposeunicode = true
ignorecase = true
logallrefupdates = true
@elulcao
elulcao / .gitignore_global
Created November 18, 2021 17:11
gitignore_global favorite configuration
# vi
*~
# Mac
**.DS_Store
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
@elulcao
elulcao / .gitconfig_work
Last active December 29, 2021 22:34
.gitconfig_work favorite configuration
[user]
email =
name =
signingkey =
[core]
isWork = true
@elulcao
elulcao / generics.go
Created May 8, 2022 23:06
Go Generics and a Binary Tree
package main
import (
"fmt"
)
// BinaryNode is the placeholder for a number
type BinaryNode[T NumberType] struct {
value T
left *BinaryNode[T]
@elulcao
elulcao / next_rune.go
Created June 21, 2022 21:38
Get next rune with Go
// getNextRune returns the next rune in the alphabet
func getNextRune(ch rune) rune {
return (ch+1-'a')%('z'-'a'+1) + 'a'
}