Skip to content

Instantly share code, notes, and snippets.

@gganley
Created February 20, 2019 19:59
Show Gist options
  • Select an option

  • Save gganley/e826d8d91414c54bada4e0523532db70 to your computer and use it in GitHub Desktop.

Select an option

Save gganley/e826d8d91414c54bada4e0523532db70 to your computer and use it in GitHub Desktop.
Determine the SLOC for all repos for any given user
mkdir temp && cd temp && curl https://api.github.com/users/$1/repos | jq -r ".[] | select(.fork == false) | .name" | xargs -I{} sh -c "git clone https://github.com/$1/{} --depth 1 && cd {} && cloc . --git --sql=../test --sql-append && cd .. && rm -rf {}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment