Skip to content

Instantly share code, notes, and snippets.

View bskim45's full-sized avatar

Bumsoo Kim bskim45

View GitHub Profile
@bskim45
bskim45 / README.md
Last active September 17, 2024 08:03
Subscribe to the Github repository on Slack

Feature Toggles

By default disabled, can be enabled:

  • branches
  • comments
  • discussions
  • reviews
  • workflows

By default enabled, can be disabled:

@bskim45
bskim45 / README.md
Last active February 6, 2023 09:48
BigQuery Audit Log Cheatsheet (Cloud Logging)
@bskim45
bskim45 / README.md
Last active October 20, 2023 09:24
atlantis cheatsheet

atlantis cheatsheet

Plan/apply only for a target resource

atlantis plan -d path/to/workspace -- -target target_resource

Destroy a workspace

@bskim45
bskim45 / I'm a night 🦉
Last active September 21, 2024 00:00
I'm a night 🦉
🌞 Morning 1 commits ▎░░░░░░░░░░░░░░░░░░░░ 1.3%
🌆 Daytime 14 commits ███▉░░░░░░░░░░░░░░░░░ 18.7%
🌃 Evening 36 commits ██████████░░░░░░░░░░░ 48.0%
🌙 Night 24 commits ██████▋░░░░░░░░░░░░░░ 32.0%
@bskim45
bskim45 / 💻 Recent coding in languages
Last active September 17, 2024 07:51
💻 Recent coding in languages
Markdown +123/ -64 ████████████▎░░░░░░░░ 58.9%
Ruby +674/ -250 ██▏░░░░░░░░░░░░░░░░░░ 10.3%
Python +962/ -321 ██░░░░░░░░░░░░░░░░░░░ 9.6%
TypeScript +1.0k/ -184 █▋░░░░░░░░░░░░░░░░░░░ 7.9%
JSON +321/ -320 █▌░░░░░░░░░░░░░░░░░░░ 7.2%
YAML +596/ -162 █▏░░░░░░░░░░░░░░░░░░░ 5.5%
TOML +57/ -3 ░░░░░░░░░░░░░░░░░░░░░ 0.5%
JavaScript +6/ -6 ░░░░░░░░░░░░░░░░░░░░░ 0.1%
@bskim45
bskim45 / package.scala
Last active January 8, 2021 16:29
Scala Parallel Collection with parallelism level
/** Parallel Collection with parallelism level
*
* Changes the task support of a parallel collection to use a fork-join pool
* with desired parallelism level
*
* Usage:
* {{{
* Seq(1, 2, 3, 4).par.withCores(Runtime.getRuntime.availableProcessors * 2).map(_ * 2).sum
* }}}
*
@bskim45
bskim45 / redshift_copy.sql
Last active September 20, 2019 09:32
Collection of Redshift Utility Queries
-- Identify how many S3 objects each COPY command loads
SELECT
query, COUNT(*) num_files,
ROUND(MAX(wq.total_exec_time/1000000.0),2) execution_secs,
ROUND(SUM(transfer_size)/(1024.0*1024.0),2) total_mb,
SUBSTRING(querytxt,1,60) copy_sql
FROM stl_s3client s
JOIN stl_query q USING (query)
JOIN stl_wlm_query wq USING (query)
WHERE s.userid>1 AND http_method = 'GET'
@bskim45
bskim45 / pre-receive
Created July 10, 2019 10:26
python + flake8 pre-receive git hook
#!/bin/bash
if test -n "$GIT_PUSH_OPTION_COUNT"
then
i=0
while test "$i" -lt "$GIT_PUSH_OPTION_COUNT"
do
eval "value=\$GIT_PUSH_OPTION_$i"
case "$value" in
force)
@bskim45
bskim45 / APIGateway.md
Last active March 10, 2023 15:41
CloudWatch Logs Insights query for API Gateway

Req id:

parse @message '(*) *' as reqId, message
| filter reqId like "c19dd3fc-5f27-11e9-a823-930d231e2ab8"
| sort @timestamp asc
| limit 50

Status code: