Skip to content

Instantly share code, notes, and snippets.

@gdamjan
Last active November 27, 2021 01:23
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gdamjan/9c87f1d7a3184e06508fe103079c9645 to your computer and use it in GitHub Desktop.
Save gdamjan/9c87f1d7a3184e06508fe103079c9645 to your computer and use it in GitHub Desktop.
my $HOME files
# ~/.aliases
# Some usefull shortcuts
alias ls='LC_COLLATE=C ls --color=auto -F --group-directories-first'
alias diff='diff --color -u'
alias d=ls
alias cd..="cd .."
alias cd...="cd ../.."
alias v="ls -l"
alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias .....="cd ../../../.."
alias json='python -m json.tool'
alias public_vnc="x11vnc -avahi -nopw -viewonly -shared -forever"
alias kvm="qemu-system-x86_64 -enable-kvm -m 2048 -usbdevice tablet -k en-gb"
alias myip="curl http://ip.ie.mk/get"
alias myip4="curl http://ipv4.ie.mk/get"
alias myip6="curl http://ipv6.ie.mk/get"
alias arduino_reset="stty 9600 -hup -F /dev/ttyUSB0"
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
source ~/.aliases
shopt -s histappend
HISTCONTROL=ignorespace:erasedups
HISTIGNORE="ls:ps:history:??"
HISTSIZE=100000
HISTFILESIZE=100000
#RED="\[$(tput setaf 9)\]"
#YELLOW="\[$(tput setaf 3)\]"
#GREEN="\[$(tput setaf 2)\]"
#BLUE="\[$(tput setaf 12)\]"
#WHITE="\[$(tput setaf 7)$(tput bold)\]"
#RESET="\[$(tput sgr0)\]"
#PS0="$RESET"
#PS1="${RESET}${GREEN}\u ${BLUE}\W ${YELLOW}\$ ${RESET}"
#PS2="${RED}…> ${RESET}"
eval "$(starship init bash)"
export AWS_VAULT_BACKEND=kwallet
export AWS_VAULT_PROMPT=kdialog
export EDITOR=vim
export PATH=~/.local/bin:$PATH
export PKGEXT=".pkg.tar"
# ~/.gitconfig
[user]
email = gdamjan@gmail.com
name = Дамјан Георгиевски
signingkey = 7CC5AC9501D6972D
abbrev = 12
[filter "lfs"]
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
[pull]
ff = only
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential
[init]
defaultBranch = main
# ~/.makepkg.conf
PACKAGER="Damjan Georgievski <gdamjan@gmail.com>"
GPGKEY="0x7CC5AC9501D6972D"
# ~/.pam_environment
SSH_AUTH_SOCK DEFAULT=${XDG_RUNTIME_DIR}/gnupg/S.gpg-agent.ssh
LANGUAGE DEFAULT=en_GB
" ~/.vim/vimrc
runtime! defaults.vim
set t_Co=256
set mouse=
set tabstop=8
set softtabstop=4
set shiftwidth=4
set expandtab
set textwidth=120
"set linebreak
"set display+=lastline
" W save with sudo
command W w !sudo tee % > /dev/null
cmap w!! w !sudo tee % >/dev/null
nnoremap ; :
nmap <silent> ,/ :let @/=""<CR>
imap <C-k> <ESC>ddi
nmap <F3> :set nonumber!<CR>
set pastetoggle=<F2>
noremap <TAB> :bn<CR>
noremap <S-TAB> :bp<CR>
au BufNewFile,BufRead *.wsgi set filetype=python
set backupcopy=auto,breakhardlink
set hlsearch
set showmatch
set list
set listchars=tab:>.,trail:.,extends:#,nbsp:.
" Tell vim to remember certain things when we exit
" '10 : marks will be remembered for up to 10 previously edited files
" "100 : will save up to 100 lines for each register
" :20 : up to 20 lines of command-line history will be remembered
" % : saves and restores the buffer list
" n... : where to save the viminfo files
set viminfo='10,\"100,:20,%,n~/.viminfo
" when we reload, tell vim to restore the cursor to the saved position
augroup JumpCursorOnEdit
au!
autocmd BufReadPost *
\ if expand("<afile>:p:h") !=? $TEMP |
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ let JumpCursorOnEdit_foo = line("'\"") |
\ let b:doopenfold = 1 |
\ if (foldlevel(JumpCursorOnEdit_foo) > foldlevel(JumpCursorOnEdit_foo - 1)) |
\ let JumpCursorOnEdit_foo = JumpCursorOnEdit_foo - 1 |
\ let b:doopenfold = 2 |
\ endif |
\ exe JumpCursorOnEdit_foo |
\ endif |
\ endif
" Need to postpone using "zv" until after reading the modelines.
autocmd BufWinEnter *
\ if exists("b:doopenfold") |
\ exe "normal zv" |
\ if(b:doopenfold > 1) |
\ exe "+".1 |
\ endif |
\ unlet b:doopenfold |
\ endif
augroup END
autocmd FileType javascript set softtabstop=3 shiftwidth=3
autocmd FileType html set softtabstop=3 shiftwidth=3 textwidth=0
autocmd FileType gitcommit setlocal spell
" Trailing or broken whitespace.
let c_space_errors=1
highlight WhitespaceEOL ctermbg=red guibg=red
match WhitespaceEOL /\s\+$/
# ~/.xprofile
export QT_LOGGING_RULES="*.debug=false"
export VDPAU_DRIVER=va_gl
export NO_AT_BRIDGE=1
export FREETYPE_PROPERTIES="truetype:interpreter-version=35"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment