Skip to content
View Anoesj's full-sized avatar
🐧
Whatever
🐧
Whatever

Sponsoring

@johnsoncodehk

Block or report Anoesj

Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. repo function for .bashrc. Run "repo... repo function for .bashrc. Run "repo" in the CLI to go to the repository on GitHub/Bitbucket on the active branch.
    1
    # Add in .bashrc/.zshrc etc.
    2
    
                  
    3
    # Print/open link to repository, preferably to currently active branch
    4
    function repo () {
    5
      if [ "$(git rev-parse --is-inside-work-tree)" = "true" ]; then
  2. Get value by object path Get value by object path
    1
    // LONG VERSION WITH ERROR LOGGING
    2
    function getValueByObjectPath (obj, path) {
    3
      const pathSplit = path.split('.');
    4
      return pathSplit.reduce((value, pathPart, depth) => {
    5
        try {