Skip to content

Instantly share code, notes, and snippets.

View jserpapinto's full-sized avatar

Serpa jserpapinto

  • Porto, Portugal
View GitHub Profile
@jserpapinto
jserpapinto / .vimrc
Created May 24, 2023 08:19
Vim configuration file
let mapleader=" "
nnoremap <SPACE> <Nop>
set nocompatible " be iMproved, required
filetype off " required
" Vundle begin
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim' " let Vundle manage Vundle, required
alias poe="poetry run"
alias ippub="curl http://ifconfig.me"
alias k="kubectl"
alias t="terraform"
alias ls="exa"
alias cat="bat --paging=never -p"
alias less="bat"
alias ccat="/bin/cat"
@jserpapinto
jserpapinto / functions.sh
Created May 24, 2023 08:11
Bash functions
function git_unstage () {
git restore --staged $@
}
# function to fast push code to git
function fast_git_push () {
git add .; git commit --amend --no-edit; git push origin $(git branch --show-current) $1
}
# function to get azure ad user object id
@jserpapinto
jserpapinto / 20-natural-scrolling.conf
Last active May 31, 2021 11:20
Ubuntu natural scrolling
Section "InputClass"
Identifier "Natural Scrolling"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Option "VertScrollDelta" "-50"
Option "HorizScrollDelta" "-50"
Option "DialDelta" "-1"
EndSection
@jserpapinto
jserpapinto / i3config
Last active May 30, 2021 16:34
Manjaro - i3 config (~/.i3/config)
# Changes:
# * bind 9 key to 9 workspace
# * prntscrn copy to clipboard
# * use py3status
# * move window across monitors
#
# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
@jserpapinto
jserpapinto / .git-commit-template
Created January 31, 2021 19:37
Git Commit Template - Conventional Commits
# If applied, this commit will...
# Why was this change made?
# Any more references to issues, articles, etc?
# --- COMMIT END ---
# Remember to:
@jserpapinto
jserpapinto / git_remove_tracking.sh
Created June 5, 2020 09:33
GIT - Remove tracking branches no longer on remote
git fetch -p && for branch in $(git branch -vv | grep ': gone]' | awk '{print $1}'); do git branch -D $branch; done
@jserpapinto
jserpapinto / i3status.conf
Created April 14, 2020 09:03
Manjaro - i3status + py3status config.
# Use this in path /etc/i3status.conf or ~/.i3/i3status.conf or ~/.config/i3/i3status.conf
# This are default manjaro i3status config with a little extra py3status config.
# This must be called by py3status in ~/.i3/config such as:
# status_command py3status -c /etc/i3status.conf # -c can be omitted.
#
# Added by jserpa:
# * `external_script vpn_info`
# --------------------- " --------------------- #
# i3status configuration file.
@jserpapinto
jserpapinto / i3-config
Last active August 15, 2019 14:28
i3wm config file
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@jserpapinto
jserpapinto / init.vim
Created August 9, 2019 14:30
NeoVim ~/.config/nvim/init.vim with vim-plug
let mapleader=" "
nnoremap <SPACE> <Nop>
set nocompatible " be iMproved, required
filetype off " required
call plug#begin()
Plug 'scrooloose/nerdTree'
nmap <C-n> :NERDTreeToggle<CR>