This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" close buffer without closing window using leader q | |
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR> | |
" nice indent for yaml files: | |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
" | |
" nice indent for html files: | |
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" close buffer without closing window using leader q | |
map <leader>q :bp<bar>sp<bar>bn<bar>bd<CR> | |
" nice indent for yaml files: | |
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab | |
" | |
" nice indent for html files: | |
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab | |
" spell checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unbind C-b | |
set-option -g prefix C-h | |
bind-key C-h send-prefix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
trap ctrl_c INT | |
function ctrl_c() | |
{ | |
echo "Trap: CTRL+C received, exit" | |
exit | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
#Unique Paths in a Grid | |
#only X,Y+1 and X+1,y movements allowed | |
# -1 is obstacle | |
class Solution: | |
def get_number_of_possible_paths(self, list_of_rows): | |
potencial_list = copy.copy(list_of_rows) | |
lo = list_of_rows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Solution: | |
def get_longest_subsequence(self, tupl): | |
sequence_counter = [] | |
longest_sequence = 1; | |
for i,ivalue in enumerate(tupl): | |
sequence_counter.insert(i,1) | |
for j in reversed(range(i)): | |
print "============" | |
print "Turn: I {0} and J {1}".format(tupl[i],tupl[j]) | |
print "I has index {0}".format(sequence_counter[i]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "c,html,javascript,python,ruby" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"***************************************************************************** | |
"" Vim-PLug core | |
"***************************************************************************** | |
if has('vim_starting') | |
set nocompatible " Be iMproved | |
endif | |
let vimplug_exists=expand('~/.config/nvim/autoload/plug.vim') | |
let g:vim_bootstrap_langs = "javascript,php,python,ruby" |