Created
September 15, 2021 22:01
-
-
Save judell/51f29f517dda52c27b2f2486dc91261d to your computer and use it in GitHub Desktop.
find gists that illustrate patterns
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> with filenames as ( | |
select | |
id, | |
jsonb_object_keys(files) as name | |
from github_my_gist | |
) | |
select | |
f.name, | |
g.files -> f.name ->> 'language' as language, | |
g.description as pattern | |
from filenames f | |
join github_my_gist g using (id) | |
where g.description ~ '^PATTERN' | |
+-----------------------------------------+----------+-----------------------------------------------+ | |
| name | language | pattern | | |
+-----------------------------------------+----------+-----------------------------------------------+ | |
| find-unused-security-groups.sql | SQL | PATTERN: UNION similar things to combine them | | |
| untagged-ec2-instances-and-keypairs.sql | SQL | PATTERN: UNION similar things to combine them | | |
+-----------------------------------------+----------+-----------------------------------------------+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment