Skip to content

Latest commit

 

History

History
114 lines (91 loc) · 2.89 KB

tools.md

File metadata and controls

114 lines (91 loc) · 2.89 KB

tldr - CLI - simplified man page

https://github.com/tldr-pages/tldr

autojump - CLI - faster navigation of directories -

https://www.linode.com/docs/tools-reference/tools/faster-file-navigation-with-autojump/

w3m - CLI - Html preview in the terminal

sudo yum install w3m -y
w3m -dump /some/path/file.html

Quite usefull to visualize html based report, like checkstyle, etc, on a remote host

img2pdf - CLI - Images to pdf

https://gitlab.mister-muffin.de/josch/img2pdf

img2pdf *.jpf --output docs.pdf

awslogs - CLI - Get AWS lambda logs in your terminal

https://github.com/jorgebastida/awslogs

awslogs get /aws/lambda/SomeFunction ALL --watch

peco - CLI - Simplistic interactive filtering tool

https://github.com/peco/peco
Example: Search file, select it and cat it

find -name '*.java' | peco | xargs cat

fzf - CLI - Interactive finder

https://github.com/junegunn/fzf#usage
Similar to peco but more customazible. Can work as quick way to build interactive menu/selection in bash

# fzf cd autocompletion
# usage: f
function f() {
	x=$(ls -a | fzf -i --height ~30 --border sharp)
	if [[ -d $x ]]; then
		cd $x
		f
	elif [[ -f $x ]]; then
		o $x
	else
	  # invalid, i.e. empty, etc. do nothing
	  :
	fi
}

Also worth installing the fzf-tab-completion, see:
https://github.com/lincheney/fzf-tab-completion

thefuck - CLI - Corrects errors in previous console commands

See https://github.com/nvbn/thefuck

> ls /root/
ls: cannot open directory '/root/': Permission denied

> fuck
sudo ls --color=auto /root/ [enter/↑/↓/ctrl+c]
[sudo] password for user: 

pyenv - Python version manager

See https://github.com/pyenv/pyenv
and its installer: https://github.com/pyenv/pyenv-installer

nvm - Node version manager

See https://github.com/nvm-sh/nvm
Installation instructions here: https://github.com/nvm-sh/nvm#installation-and-update

rvm - Ruby version manager

See https://rvm.io/

gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable

sdkman - Java (and other) version manager

https://sdkman.io/

peek - Simple animated GIF screen recorder

https://github.com/phw/peek

shellcheck - syntax checker

https://www.shellcheck.net/

bats - Writing tests for bash scripts

https://github.com/sstephenson/bats

Run previous command with sudo

alias please="sudo \$(fc -ln -1)"

Get the source directory of a bash script from within the script itself

my_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

It will work as long as the last component of the path used to find the script is not a symlink (directory links are OK).

Simple http server based on nc

#!/bin/bash
while true; do printf 'HTTP/1.1 200 OK\n\n%s' "$(cat index.html)" | nc -l 5555; done