Skip to content

Instantly share code, notes, and snippets.

View automagicaly's full-sized avatar

Renan Lordello de Aguiar automagicaly

  • Amazon
  • São Paulo, Brazil
View GitHub Profile
#############################################
# Functions
#############################################
get_git_branch(){
# Based on: http://stackoverflow.com/a/13003854/170413
local branch
if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then
if [[ "$branch" == "HEAD" ]]; then
branch='detached* '
#! /bin/bash
left="eDP-1"
middle="DP-1-1"
right="DP-1-2"
xrandr --auto
xrandr --output $middle --right-of $left
xrandr --output $right --right-of $middle
set nocompatible " be iMproved, required
syntax off
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
@automagicaly
automagicaly / autoinc.sh
Created November 14, 2017 20:38
Auto increment variable
export autoinc=$((++autoinc));
@automagicaly
automagicaly / .tmux.conf
Created November 14, 2017 16:23
My tmux configuration
# redefine Prefix
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# Vi copypaste mode
set-window-option -g mode-keys vi
# don't rename windows automatically
set-option -g allow-rename off
@automagicaly
automagicaly / .bashrc
Last active September 5, 2018 20:09
git branch on command line
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
#############################################
# Functions
#############################################
get_git_branch(){