bookercodes / github-unfollow-everyone

:fallen_leaf: Start anew. Unfollow everyone who you currently follow on GitHub.
MIT License
29 stars 3 forks source link

Improvements #1

Closed bookercodes closed 8 years ago

bookercodes commented 9 years ago

Here are some ideas for improvements:

If you desire any of these let me know, and I will work on them :smile:.

stoked-zz commented 8 years ago

I keep getting an error env: node\r: No such file or directory when I run the cli.

Steps:

  1. npm install --global github-unfollow-everyone
  2. github-unfollow-everyone my_username my_password
  3. env: node\r: No such file or directory

Any thoughts?

bookercodes commented 8 years ago

@stoked It's funny :laughing: -- I stumbled upon your profile the other day and thought "This person's going to need github-unfollow-everyhone one day" and here you are!

As for your error, could you please try this solution and let me know how it goes?

I'm not sure if this is a problem with your Node installation or my code. I suspect the former.

stoked-zz commented 8 years ago

haha! It was inevitable our paths would cross lol.

You're probably correct, I'll try that solution this evening and let you know how it goes. Thank you for responding with help! : )

stoked-zz commented 8 years ago

I do believe that this is a problem with my node installation, as I installed via Homebrew so it sends it to usr/local/bin not usr/bin. Unfortunately, the new OS X El Capitian does not allow users (even with sudo) to edit or symlink to usr/bin... We seem to be out of luck on this one.

Any suggestions on how I could possibly make this script work? Or should I just let the node universe have this win and retire the hope of a clean github haha.

bookercodes commented 8 years ago

I highly recommend nvm! I used to have trouble installing Node all the time before I started using it. Let me know how you get on.

stoked-zz commented 8 years ago

Strange, I'm not sure what's going on now haha. I uninstalled node, and re-installed via NVM but still get the same error: env: node\r: No such file or directory

After a bit of research I found others got the same error because of new lines being handled differently in a unix platform. Not sure if that helps at all. Additionally, I am on the latest Mac OS X.

Here is an example of what seems to be the problem for most people - https://github.com/colorhook/node-smushit/issues/4

bookercodes commented 8 years ago

@stoked You know what, now I think about it, I wrote this module on Windows! I'll convert the line-endings and push an update this evening. You can then test it. Sound good?

stoked-zz commented 8 years ago

Perfect!

bookercodes commented 8 years ago

@stoked I think I fixed it.

Please update your module (npm install -g github-unfollow-everyone) and try again.

stoked-zz commented 8 years ago

Success! Well, mostly. It works brilliantly with an account with just a handful of people followed. The larger ones (needing to unfollow thousands) is presumably loading or working through it. I will leave it running for a while, and see how long it takes, if it ever does, to unfollow huge numbers like mine : )

I'll let you know how it does. Thanks so much for the help! And glad we got it at least working on smaller accounts on my machine!

bookercodes commented 8 years ago

@stoked I would be surprised if it worked on your account. 30,000 followers is a lot. I don't imagine it'd take long for GitHub to throttle the requests.

Let me know how it goes.

stoked-zz commented 8 years ago

haha yeah 30K may take a while. It seems to take ~10-ish min to unfollow 500 users. At the end of running this message appears - Which I assume is github telling me to piss off for a bit haha.

oops. an error occured: { [Error: getaddrinfo ENOTFOUND api.github.com api.github.com:443] defaultMessage: 'Internal Server Error', message: 'getaddrinfo ENOTFOUND api.github.com api.github.com:443', code: '500' }

It may take a while, but it definitely gets the job done! Thanks again! (and like I said before, it is lightning fast unfollowing a handful of users)