GitHub clone all repositories

After you join an organization, you will need to clone all git repositories in your machine probably. 🙂

So first follow this post https://kenanhancer.com/2018/11/08/github-connect-with-your-ssh-public-key/ to create a ssh key in your machine and put in github then you can clone all repositories for any user.

if you have any authentication issue, then create an access token from github, copy and paste instead of {acceess-token} in the following code.

curl -u {access-token}:x-oauth-basic -s https://api.github.com/users/kenanhancer/repos?per_page=2 | grep ssh_url | awk -F '"' '{print $4}' | xargs -n 1 -P 4 git clone

In order to learn github API endpoint urls, use the following code.

curl https://api.github.com/

To learn more details about official GitHub REST API v3, use the following link.

https://developer.github.com/v3/

Node.js Module Export and Import with CommonJS and ES6

I hope that this post will help any developer who need to see variations of importing and exporting modules. To be honest, due to using different programming languages, I sometimes forget some features so this post helped me every time 🙂

This is an other online code editor. Same examples is in this example as well.

CJS and ESM Usage Demo

Github Connect with your SSH Public Key

If you are using git for your projects, you need to run some git commands such as clone, pull or push. So, let's say that you want to clone one git project and if it is asking your username and password, you can create a SSH Public Key for your pc, after that you can paste it your github account so that you will never need to specify username and password.

You can follow below screenshot to create a SSH Public Key. After you create it, copy created SSH Public Key from terminal and paste it to GitHub SSH Keygen window like below.

Follow below screenshots to add your SSH Public Key in your GitHub account.