Skip to content

Instantly share code, notes, and snippets.

View riccardosven's full-sized avatar

Riccardo Sven Risuleo riccardosven

  • H&M - Business Tech
  • Sweden
View GitHub Profile

Keybase proof

I hereby claim:

  • I am riccardosven on github.
  • I am riccardosven (https://keybase.io/riccardosven) on keybase.
  • I have a public key ASAUgxNYkYM6JJ9kTT-EGHtTBMXVTszAQtTyVGmJ5TzXAgo

To claim this, I am signing this object:

@riccardosven
riccardosven / nvim.init
Last active January 12, 2018 13:16
My nvim.init file
" vim: fdm=marker
" An example for a vimrc file.
"
" To use it, copy it to
" for Unix: $XDG_CONFIG_HOME/nvim/init.vim
" for Windows: %LOCALAPPDATA%\nvim\init.vim
" Dein: {{{
if &compatible
set nocompatible
@riccardosven
riccardosven / kbdswap.lua
Last active December 13, 2015 10:14
Lua function to change keyboard layout.
function ()
-- Rotate keyboards table,
-- requires a global variable called keyboards with the layouts listed,
-- e.g. keyboards = {'dvorak','us','us dvorak-intl'}
table.insert(keyboards,table.remove(keyboards,1))
-- Extract first layout
local new_layout = keyboards[1]
@riccardosven
riccardosven / tilingaware.plugin.zsh
Last active August 29, 2015 14:02
Oh-my-zsh plugin that saves the dirstack between sessions and keeps the pwd consistent.
DIRSTACKSIZE=9
DIRSTACKFILE=~/.zdirs
if [[ -f $DIRSTACKFILE ]] && [[ $#dirstack -eq 0 ]]; then
dirstack=( ${(f)"$(< $DIRSTACKFILE)"} )
[[ -d $dirstack[1] ]] && cd $dirstack[1]
fi
function chpwd() {
print -l $PWD ${(u)dirstack}> $DIRSTACKFILE
}