Skip to content

Latest commit

 

History

History
82 lines (71 loc) · 4.25 KB

README.md

File metadata and controls

82 lines (71 loc) · 4.25 KB

This file is part of eRCaGuy_dotfiles: https://github.com/ElectricRCAircraftGuy/eRCaGuy_dotfiles

See also

  1. ../useful_startup_programs.md
  2. power_supply_README.md - Remote-controllable power supplies, and commands and scripts to control them
  3. README_git-diffn.md - git diffn
  4. README_git-sync_repo_from_pc1_to_pc2.md - sync_git_repo_from_pc1_to_pc2.sh
    1. sync_git_repo_from_pc1_to_pc2--notes.md - my scratch notes
  5. README_ros_readbagfile.md - ros_readbagfile

eRCaGuy_dotfiles/useful_scripts

Each script herein has detailed installation and usage information commented in the top of it. So, look inside each file for details. For any script which I'd really like to highlight or explain, however, I've provided additional details below.

  1. git-diffn.sh
    1. README_git-diffn.md
    2. git diff with line numbers
  2. git-blametool.sh
    1. See my answer and demo about git blametool here: StackOverflow: Is there git blame gui similar to bzr qannotate?.
  3. PC-to-PC Git-based Folder/Project Sync Script
    1. README_git-sync_repo_from_pc1_to_pc2.md
    2. git-based sync script to re-sync gigabytes of data over a cell phone hot spot in 1 minute and with 50 MB data usage
  4. ros_readbagfile.py
    1. README_ros_readbagfile.md
    2. Read ROS (Robot Operating System) messages on certain topics from within a pre-recorded ROS bag file.
      1. Tutorial I wrote: Reading messages from a bag file
  5. rgf.sh
    1. Ripgrep fuzzy finder: this ('rgf') is a RipGrep interactive fuzzy finder of content in files! It is a simple wrapper script around Ripgrep and the fzf fuzzy finder that turns RipGrep ('rg') into an easy-to-use interactive fuzzy finder to find content in any files. VERY USEFUL AND EASY TO USE!
  6. rg_replace.sh (rgr)
    1. Ripgrep Replace: this is a wrapper around Ripgrep which allows you to do full find-and-replace on your disk. See rg_replace.sh. Installation instructions are in the top of the file. Sample help menu from it (rgr -h): BurntSushi/ripgrep#74 (comment)

Generic Linux Ubuntu "installation" instructions for literally any executable or script in the world

INSTALLATION INSTRUCTIONS

  1. Create a symlink in ~/bin to this script so you can run it from anywhere.
    cd /path/to/myscript_dir
    mkdir -p ~/bin
    # Required
    ln -si "${PWD}/myscript.sh" ~/bin/myscript
    # Optional: prefix the script with your initials; replace `gs` with your
    # initials
    ln -si "${PWD}/myscript.sh" ~/bin/gs_myscript
  2. Log out and log back in if using Ubuntu with a default ~/.profile file which automatically adds ~/bin to your PATH variable. This will cause ~/bin to be automatically added to your path. If you're missing Ubuntu's default ~/.profile file, you can copy it from the /etc/skel directory like this:
    cp -i /etc/skel/.profile ~
    You can alternatively manually add the ~/bin dir to your PATH with this code. Add this to the bottom of your ~/.bashrc file if you don't have the ~/.profile file mentioned above:
    # set PATH so it includes user's private bin if it exists
    if [ -d "$HOME/bin" ] ; then
        PATH="$HOME/bin:$PATH"
    fi
    Now log out and log back in again if you just added the ~/bin dir to your PATH as described above.
  3. OR, re-source your ~/.bashrc file if the ~/bin dir did already exist and was already in your PATH:
    # Same as running `source ~/.bashrc`
    . ~/.bashrc
  4. Now you can use this command/executable directly anywhere you like, like this:
    myscript
    # OR
    gs_myscript