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
" Changes all uuids in a document | |
noremap <leader>cu :%s/[-[:xdigit:]]\{36}/\=substitute(system('uuidgen'), "\n", "", "")/<CR> | |
" Inserts a new uuid at cursor | |
noremap <leader>iu :let @u=substitute(system('uuidgen'), "\n", "", "")<CR>"up |
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
""" Will replace all 36 character uuids in a file. | |
noremap <leader>uu :%s/[-[:xdigit:]]\{36}/\=substitute(system('uuidgen'), "\n", "", "")/<CR> |
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
autoload -U colors && colors | |
all-git() { | |
for i in */.git; do | |
gitdir=$(dirname $i); | |
echo $fg[green]">>> repos="$gitdir $reset_color | |
(cd $gitdir && git $@) | |
echo "" | |
done | |
} |
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
/* | |
MIT License | |
Copyright (c) 2017 Stian Lode, | |
stian.lode@gmail.com | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
""" | |
MIT License | |
Copyright (c) 2017 Stian Lode, | |
stian.lode@gmail.com | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
body { | |
background: #fff; | |
} | |
hr.style-eight { | |
padding: 0; | |
border: none; | |
border-top: 3px solid #000; | |
text-align: center; | |
margin: 30px 0; | |
} |
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
def print_cmd(command, line_length=80, indent=" "): | |
import sys, textwrap | |
lines = textwrap.wrap( | |
command, | |
width=line_length, | |
subsequent_indent=" \\\n" + indent, | |
break_long_words=False, | |
break_on_hyphens=False) | |
for line in lines: |
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
let g:ffind_excl_files = ['*.swp', '*~', '*.pyc', '*.so', '*.gif', '*.png'] | |
let g:ffind_incl_files = ['*.c', '*.hh', 'scons*', '*.py', '*.cpp', '*.h', '*.hpp', '*.php','*.js','*.css','*.html','*.scss'] | |
let g:ffind_path = '.' | |
function! FFind(...) | |
" Timing the search | |
let l:start=reltime() | |
let l:expaths = exists('g:ffind_excl_path') ? " \\( -path " . join(g:ffind_excl_path, " -o -path ")." \\) -prune -o" : '' | |
let l:exfiles = exists('g:ffind_excl_files') ? " -not \\( -iname '".join(g:ffind_excl_files, "' -o -iname '")."' \\) " : '' |