Skip to content

Instantly share code, notes, and snippets.

View sryabkov's full-sized avatar

Sergei Ryabkov sryabkov

View GitHub Profile
tap "azure/draft"
tap "boz/repo"
tap "browsh-org/browsh"
tap "contribsys/faktory"
tap "datawire/blackbird"
tap "davrodpin/mole"
tap "derailed/k9s"
tap "dtan4/dtan4"
tap "fishtown-analytics/dbt"
tap "fluidkeys/tap"
@br3ndonland
br3ndonland / github-actions-notes.md
Last active February 12, 2025 05:53
Getting the Gist of GitHub Actions
@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@Intelrunner
Intelrunner / bq_slot_usage.sql
Last active March 29, 2022 18:43
This Query Estimates slot usage per SECOND at an organizational level, segregated by project_id. Use: Finding average number of slot seconds per second to determine if purchasing Google Cloud Platform Bigquery Slots is valuable for an organization. Requires: bigquery.jobs.listAll
SELECT
TIMESTAMP_TRUNC(jobs.start_time, second) as sec,
SUM(SAFE_DIVIDE(total_slot_ms, TIMESTAMP_DIFF(end_time, start_time, MILLISECOND))) AS Slot_Count, project_ID as project
FROM
`region-us`.INFORMATION_SCHEMA.JOBS_BY_ORGANIZATION jobs
WHERE jobs.start_time BETWEEN TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 3 DAY) AND CURRENT_TIMESTAMP()
GROUP BY project_id, sec
ORDER BY sec DESC
@zas
zas / sha256github_pubkey.sh
Created February 28, 2022 20:49
Calculate sha256 hash from a pub key to compare to github deploy key
#!/bin/bash
# calculate sha256 hash from a pub key to compare to github deploy key
KEY=$1
KEYPATH="~/.ssh/${KEY}.pub"
ssh-keygen -E sha256 -l -f "$KEYPATH"