Category: technology

  • Git is not working after macOS Update

    Git is not working after macOS Update

    Yesterday I updated my macOS to latest Catalina version. After updating it GIT was not working. That always happens to me :-).

    I was getting following error.

    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

     

    Many of you might also get this error. So the solution is pretty simple. Just follow a couple of steps and solve the problem.

    Step 1: Open Terminal and run following command

    xcode-select --install

    Step 2: After this command, there will be a prompt to update the software. So update that.

    And wait for the software to be updated.

    That’s it.

     

    Ref: https://stackoverflow.com/questions/52522565/git-is-not-working-after-macos-update-xcrun-error-invalid-active-developer-pa

  • BuddyPress Re-post Activity WordPress Plugin

    BuddyPress Re-post Activity WordPress Plugin

    Sometimes you like someone’s post in activity thread and you want to re-post that activity publically or on your group.

    So now you can re-post an activity from BuddyPress activity page with the help of this plugin.

    What this plugin does? It will provide a button for reposting activity. We can also enable/disable this functionality from backend.

    Screenshots

    1. Re-post any activity by clicking on the “Re-Post” button.

    2. Select where to re-post.

    3. Enable/Disable re-post functionality.

     

    https://www.youtube.com/watch?v=vBAb2s422LY

    WP Plugin URL:  https://wordpress.org/plugins/bp-repost-activity/

    GitHub URL: https://github.com/BhargavBhandari90/bp-repost-activity

  • Need Help… How to use trigger event in backbone?

    So I have a script where I am trying to trigger click event by jQuery.

    Here is the syntax $( '#selector' ).trigger( 'click' ).

    But that will work if the click event function is written in jQuery.

    What if click event is written in backbone? How can I trigger click for that?

    If anyone has idea, then please reply for this.

  • User avatar in BuddyPress notification loop

    User avatar in BuddyPress notification loop

    BuddyPress by default doesn’t show user avatar in the notifications. But you can do that by simply adding couple of lines in notification loop.

    BuddyPress stores the other user id as secondary id.

    Here is the code to be used in notification loop.

    echo bp_activity_avatar(
        array( 'user_id' => bp_get_the_notification_secondary_item_id() )
    );
    

    That’s it…

  • Fix Unhandled rejection Error: EACCES: permission denied

    Fix Unhandled rejection Error: EACCES: permission denied

    I was trying to install gulp on my mac.

    But I was getting following errors while running command sudo npm install gulp -g

    Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/bhargav/.npm/_cacache/....'
    
    Unhandled rejection Error: EISDIR: illegal operation on a directory, open '/Users/bhargav/.npm/_cacache/....'
    
    npm ERR! cb() never called!
    
    npm ERR! This is an error with npm itself. Please report this error at:
    npm ERR!     <https://npm.community>
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/bhargav/.npm/_logs/2019-02-05T14_33_58_146Z-debug.log

    After a lot of findings from StackOverflow, I found the following solution for that.

    You have to run following two commands and that’s it.

    sudo chown -R $USER:$GROUP ~/.npm
    sudo chown -R $USER:$GROUP ~/.config