Skip to content

🤷 Everything I thought interesting keeping record of !

Notifications You must be signed in to change notification settings

NikolaLohinski/awesome-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 

Repository files navigation


logo of tools-awesome repository

This repository holds everything I thought interesting keeping record of 🤷

Awesome tools Awesome

Languages and frameworks

Shell

  1. Bash aliases

  2. fzf : an interactive Unix filter fuzzy finder for command-line that can be used with any list; files, command history, processes, hostnames, etc... ;

  3. To dump multiline inputs into a file directly from a terminal, one needs to use << operator as such:

    $ cat << EOF > filename.yml
    ...
    content:
      of: "file"
    ...
    EOF
  4. As an alternative to find, fd is written in Rust and drastically more efficient ;

  5. As an enhanced alternative to cat, bat is written in Rust and supports a large number of languages syntax hightligthing ;

  6. entr is a nice independent utility for running arbitrary commands when files change ;

  7. To have eternal history in bash, add the following to your ~/.bashrc:

    # Eternal bash history.
    # ---------------------
    # Undocumented feature which sets the size to "unlimited".
    # http://stackoverflow.com/questions/9457233/unlimited-bash-history
    export HISTFILESIZE=
    export HISTSIZE=
    export HISTTIMEFORMAT="[%F %T] "
    # Change the file location because certain bash sessions truncate .bash_history file upon close.
    # http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login
    export HISTFILE=~/.bash_eternal_history
    # Force prompt to write history after every command.
    # http://superuser.com/questions/20900/bash-history-loss
    PROMPT_COMMAND="history -a; $PROMPT_COMMAND"

    Moreover, you need to make sure that no other file such as ~/.profile or ~/.bash_profile sets HISTFILESIZE or HISTSIZE environment variables.

  8. direnv is a shell extension. It adds a new feature that can load and unload environment variables depending on the current directory.

  9. To open any new terminal in the directory that was visited last, simply add the following lines at the end of your ~/.bashrc:

    PROMPT_COMMAND="$PROMPT_COMMAND; pwd > \"${XDG_RUNTIME_DIR}/.cwd\""
    [[ -f "${XDG_RUNTIME_DIR}/.cwd" ]] && cd "$(< ${XDG_RUNTIME_DIR}/.cwd)"

    And add the following line to your ~/.bash_profile, in order to reset the .cwd when you open a new session:

    echo ${HOME} > \"${XDG_RUNTIME_DIR}/.cwd\""
  10. A handy shell script that permits writing automated repeatable demos: demo-magic

  11. autojump is a simple terminal tool to never ever right cd <somewhere> again

  12. Whene working in an CI environment such as Gitlab's CI/CD or Github Actions, one usually needs to access the predefined environment variables. Those are usually prefixed with unchanged characters such as CI_. But some tools (such as cypress) require an other prefix to autoload variable such as those. To overcome this issue, a little shell script such as the following shoud suffice:

    $ function prefix_variables() {
        while IFS= read -r v; do 
          export "$2_${v}=$(printf '%s\n' ${!v})";
        done < <(compgen -A variable | grep "^$1_");
      }
    
    $ export PREFIX_VAR="value"
    $ prefix_variables "PREFIX" "PRE"
    $ echo ${PRE_PREFIX_VAR}
    value

Golang

  1. Output a test coverage report easily :

    $ go test -coverprofile=/tmp/coverage.out
    $ go tool cover -html=/tmp/coverage.out -o /tmp/coverage.html
    $ <YOUR FAVORITE BROWSER> /tmp/coverage.html &
    
  2. Upgrade or downgrade easily Golang with minimal system intrusions using update-golang.sh ;

  3. Manage different versions of Golang with gvm ;

  4. Manage your development workflow with Go in a Makefile way with mage. This tool can be augmented with mage-select for easier usage;

Javascript

Node

  1. Node Version Manager : POSIX-compliant bash script to manage multiple active node.js & npm versions ;

Vue.js

  1. Beautiful UI components framework: cube-ui

Python

  1. virtualenvwrapper is a set of extensions to virtualenv tool. The extensions include wrappers for creating and deleting virtual environments and otherwise managing your development workflow ;

Git

  1. My git configuration ;

  2. To have a global .gitignore file accross the environment, create a .gitignore in your home directory, and run:

    $ git config --global core.excludesfile ~/.gitignore
    

    This will create the following entry in your .gitconfig:

    [core]
          excludesfile = {path-to-home}/.gitignore
    
  3. A command line tool to interact with a Gitlab repository, making it simple to clone, fork, including seamless workflow for creating merge requests, issues and snippets: lab ;

  4. My lab aliases and helper functions ;

  5. A command line tool to interact with a Github repository: hub

  6. A nice plugin to bash providing contextual git information : bash-git-prompt ;

  7. Git autocompletion for bash ;

Rust

  1. gotham is a flexible web framework that promotes stability, safety, security and speed. The documentation is full of almost ready-to-use examples which make it a very user-friendly framework ;

Cross language

  1. Use quicktype to convert JSON into gorgeous, type-safe code in any language ;

Containers

CI/CD

  1. Repeatable and understandable builds with Earthly that merges makefiles & dockerfiles ;

Docker

  1. Use Cloud SQL with the google proxy side container: In order to proxify a cloudSQL POSTGRES instance in a sideContainer, you will need a service account with one of this roles :

    • Cloud SQL > Cloud SQL Client
    • Cloud SQL > Cloud SQL Editor
    • Cloud SQL > Cloud SQL Admin

    Once this service account is created, you will need a service-account key to be available locally. To generate one, go to the IAM page of this service account (GCP console > IAM & admin > Service accounts), generate one and download it.

    Retrieve the Instance Connection Name field:

    • Go to GCP console > SQL
    • Select the instance you want to access to
    • In the Overview tab, the Instance Connection Name field is under the Connect to this instance section.

    Open a terminal and define the following variables:

    • DIR_PATH_CREDENTIALS: local path to the directory containing the credentials you just generated and downloaded
    • INSTANCE_NAME: the instance connection name you just found in the GCP console
    • CREDENTIALS: name of the credentials file For example:
    $ export DIR_PATH_CREDENTIALS=/home/you/Downloads
    $ export INSTANCE_NAME=my-awesome-project:europe-west1:database-instance-id
    $ export CREDENTIALS=service-account-credentials.json
    

    Start the cloud SQL proxy container:

    $ docker run -p 127.0.0.1:5432:5432 --name cloud-sql-proxy -v ${DIR_PATH_CREDENTIALS}:/opt b.gcr.io/cloudsql-docker/gce-proxy /cloud_sql_proxy -instances=${INSTANCE_NAME}=tcp:0.0.0.0:5432 -credential_file=/opt/${CREDENTIALS}
    

Kubernetes

  1. Telepresence: Just follow the script given on https://www.telepresence.io/reference/install

    curl -s https://packagecloud.io/install/repositories/datawireio/telepresence/script.deb.sh | sudo bash sudo apt install --no-install-recommends telepresence
    

    Telepresence is using the kubectl commands so you just have to connect to your cluster using the command line given in the google cloud platform console. Since we enabled the k8s network policies, we need to deploy the telepresence node we will later connect to by applying the following file: telepresence.yaml

    kubectl apply -f /tmp/telepresence.yaml
    

    Then you just have to type Telepresence in your console: all the cluster IPs are proxyfied automatically.

    telepresence --deployment telepresence --run-shell --also-proxy SOME.IP.TO.PROXYFY
    

    The swap deployment is useful as it replace the current deployment by your local environment. So you are able to debug the code being edited in goland. In order to do the replacement, telepresence sets the replicaset to 0 in your cluster. The following command is used to replace the format-worker deployment:

    telepresence --also-proxy 192.168.1.249 --also-proxy 192.168.1.250 --swap-deployment format-worker
    

    In the case of an non-worker pod, you must add --expose 8080 to bind the port in the cluster

  2. Switch faster between clusters and namespaces in kubectl with kubectx.

  3. K9s provides a curses based terminal UI to interact with your Kubernetes clusters. The aim of this project is to make it easier to navigate, observe and manage your applications in the wild. K9s continually watches Kubernetes for changes and offers subsequent commands to interact with observed Kubernetes resources.

  4. kind is a very useful tool for running local Kubernetes clusters using Docker container "nodes".

  5. Kubernetes YAML Generator is a helper tool to define manifests. It provides meaningful explanations for each section of the resource and fillable forms to build your YAML file.

Documentation

Swagger

  1. Node swagger-ui-watcher with hot reload feature to serve a rendered swagger HTML ;

  2. Convert OpenAPI definitions into json schemas for all types in the API with openapi2jsonschema ;

  3. Render very nice customizable swaggers in HTML with redoc ;

Code resources

  1. Antora is a multi-repository documentation site generator for tech writers who love writing in AsciiDoc ;

  2. Create and share beautiful images of your source code with carbon ;

  3. Record and share terminal sessions the right way with asciinema ;

Other

Browser

  1. Vimium for Chrome or Firefox to browse the web with your keyboard ;

  2. JSON Viewer awesome for Chrome only to visualize and json files in a very nice way ;

Desktop

  1. My i3 configurations:

  2. If using Jetbrains products such as Goland, or Idea, and upgrading them with Jetbrains Toolbox, the executables are not accessible directly in the path. To make a dynamic link to the latest downloaded Pycharm (for example) version, proceed as follows:

    $ su
    $ cat << EOF > /usr/local/bin/pycharm
    
    #!/bin/sh
    exec $(ls -t -d $HOME/.local/share/JetBrains/Toolbox/apps/PyCharm-P/ch-*/*/ | grep -v ".plugins" | head -n 1)bin/pycharm.sh
    EOF
    
    $ exit 
  3. To install easily AUR packages on an Archlinux/Manjaro OS, one can use pacaur, which mimics pacman with AUR packages.

Software

  1. Bitwarden is an opensource authentication management solution to help handle passwords, keys, sensitive data etc... It comes handy with a nice CLI for terminal interaction with the vault.

  2. balenaEtcher is a very simple tool to flash USB keys into bootable drives

  3. To share files via P2P on a local network, one should use ShareDrop

  4. Simplest terminal-friendly programming cheat sheet ever invented: cheat.sh

    Used with curl as such :

    $ curl cheat.sh/<TOPIC>/<QUERY>

    Example:

    $ curl cheat.sh/go/python+use+environment+variable

About

🤷 Everything I thought interesting keeping record of !

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages