Skip to content

Instantly share code, notes, and snippets.

@kuitos
Created September 18, 2017 05:08
Show Gist options
  • Save kuitos/05008d3ac845fcef1088afe108ecd4ec to your computer and use it in GitHub Desktop.
Save kuitos/05008d3ac845fcef1088afe108ecd4ec to your computer and use it in GitHub Desktop.
all fb monster repos
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>github</title>
</head>
<body>
<script src="https://unpkg.com/lodash@4.17.4/lodash.js"></script>
<script type="module">
const fetch = page =>
window.fetch(`https://api.github.com/search/code?q=%22Patent%20Assertion%22%20is%20any%20lawsuit%20or%20other%20action%20alleging%20direct,%20indirect+org:facebook+in:file&page=${page}`,
{ method: 'GET' }).then(res => res.json());
(async () => {
const repos = (await Promise.all([fetch(1), fetch(2), fetch(3), fetch(4), fetch(5)])).reduce((r, v) => [...r, ...v.items], []);
const result = _.uniqWith(repos, (v1, v2) => v1.repository.name === v2.repository.name).map(v => v.repository.name).sort();
console.table(result);
})();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment