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
docker container stop ansible-player && | |
docker container rm ansible-player && | |
docker rmi $(docker images | grep ansible | awk -F ' ' '{print $3}') |
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
Show hidden characters
{ | |
"presets": ["es2016"] | |
} |
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
" Replace all Swedish special characters with entities. | |
" adapted from http://vim.wikia.com/wiki/HTML_entities | |
nnoremap <silent> ,r :call ReplaceSweChar()<CR> | |
function! ReplaceSweChar() | |
silent %s/Å/\Å/eg | |
silent %s/Ö/\Ö/eg | |
silent %s/Ä/\Ä/eg | |
silent %s/É/\É/eg | |
silent %s/å/\å/eg | |
silent %s/ö/\ö/eg |
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
^(.*)(\r?\n\1)+$ |
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
\/[(\s+)\—]+Folder[(\s+)\—]+ |
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
^(.*)(\r?\n\1)+$ # search for duplicate lines in file | |
\: # look for character | |
\n # put in newline character |
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 | |
srcDir="/foo/bar" # <--- change this to where you will download the files | |
newDir="/foo/bar/ouch" # <--- change this to where you want to move the files | |
url="your url" | |
echo "Let's download some files..." | |
wget -m -P $srcDir -A pdf $url | |
echo "going to $srcDir..." |
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
:%s/old/new/gc |
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
git init --bare $HOME/.cfg | |
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME' | |
config config --local status.showUntrackedFiles no | |
echo "alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'" >> $HOME/.zshrc |
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
# Sanitize a Linux directory listing so that it shows files, directories, and contents of subdirectories | |
# useful for sending a listing in an email, IM message, or online | |
^\-?[a-z]+(\s) # directory bit and file permissions | |
[0-9]{1}(\s) # directory counter, shows how many subdirectories this file has. | |
[a-z]+\s # owner | |
[a-z]+\s+ # group | |
[0-9]+\s+ # filesize | |
[a-z]+\s+[0-9]+\s+ | |
[0-9]+:?[0-9]+\s # date, last updated |