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.o.winbar = "%{%v:lua.require'nvim.utils.nvim.winbar'.eval()%}" |
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 | |
# Save this file as /usr/bin/apt-pac and chmod +x it. | |
case "$1" in | |
autoremove) | |
pacman -Rns $(pacman -Qdtq); | |
;; |
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
pb-kill-line () { | |
zle kill-line | |
echo -n $CUTBUFFER | pbcopy | |
} | |
pb-kill-whole-line () { | |
zle kill-whole-line | |
echo -n $CUTBUFFER | pbcopy | |
} |
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
texto = open('alice.txt').read().lower() | |
from string import punctuation | |
for c in punctuation: | |
texto = texto.replace(c, ' ') | |
texto = texto.split() | |
dic = {} | |
for p in texto: | |
if p not in dic: | |
dic[p] = 1 | |
else: |
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
function! MarkdownFolds() | |
let thisline = getline(v:lnum) | |
if match(thisline, '^##') >= 0 | |
return ">2" | |
elseif match(thisline, '^#') >= 0 | |
return ">1" | |
else | |
return "=" | |
endif | |
endfunction |
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
#!/usr/bin/perl | |
#-------------------------------------------------- | |
# Usage: | |
# ./speak.pl en input.txt output.mp3 | |
# | |
# Prerequisites: | |
# sudo apt-get install libwww-perl libhtml-tree-perl sox libsox-fmt-mp3 | |
# | |
# Compiling sox: |
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
" Copyright 2022 Igor Burago. Distributed under the ISC License terms. | |
" Simple emulation of indentation guides. | |
" | |
" For tab-based indentation, using the 'listchars' option works fine. | |
" For space-based indentation, one can either: | |
" • use the match highlighting feature (see ':help match-highlight'), | |
" as shown in ToggleMatchHighlightIndentGuides(); or | |
" • use the 'leadmultispace' setting of the 'listchars' option (added | |
" in Vim 9.0), as shown in ToggleListCharsIndentGuides(). |
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 | |
_opts () { | |
perl -ne ' | |
print if s/^.IP .\\fB\\-/-/ and s/\\(f(P|I|B|R)|)|".*//g; | |
print if s/^.IX Item .\-/-/ and s/"//g; | |
print if s/^.It Fl /-/;' | |
} | |
_man_generic() { |
NewerOlder