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
| #!/usr/bin/env python3 | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "boto3", | |
| # ] | |
| # /// | |
| import argparse | |
| import boto3 |
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
| #!/usr/bin/env bash | |
| set -ueo pipefail | |
| get_repo_id() { | |
| local -r org="$1" | |
| local -r repo_name="$2" | |
| cat <<_PAYLOAD_ \ | |
| | curl \ | |
| --silent \ | |
| --fail \ |
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
| -- Source: https://stackoverflow.com/a/21738732/495558 | |
| -- NOTE: This script is adjusted from the original: | |
| -- - Added Indices' size. | |
| -- - Limited only those whose size exceeding 100MiB. | |
| select | |
| schema_name, | |
| relname, | |
| pg_size_pretty(table_size) as size, |
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
| #!/usr/bin/env bash | |
| set -u -e -o pipefail | |
| git clone https://github.com/ramzes3333/feign-reactive | |
| # Change version to 4.0.4.UNOFFICIAL | |
| find feign-reactive -type f -name 'pom.xml' \ | |
| -exec \ |
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
| #!/usr/bin/env bash | |
| #---------- | |
| # back | |
| # Goes back to parent directory quicker. | |
| # | |
| # NUMBER - goes back to x levels by repeatedly calling `cd ..`. | |
| # SUBPATH - a segment of a full path to go back. | |
| # | |
| # *KNOWN LIMITS* |
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
| function replacerJSONStringify() { | |
| if (window.__JSON_stringify_replaced__ === true) { | |
| return; | |
| } | |
| const _originalStringify = JSON.stringify; | |
| // NOTE: | |
| // ---- |
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
| package com.grokhard.exploring.java.mapstruct; | |
| import static org.junit.jupiter.api.Assertions.assertEquals; | |
| import org.junit.jupiter.api.Test; | |
| import org.mapstruct.BeanMapping; | |
| import org.mapstruct.Mapper; | |
| import org.mapstruct.MappingTarget; | |
| import org.mapstruct.NullValueCheckStrategy; | |
| import org.mapstruct.NullValuePropertyMappingStrategy; |
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
| ssh-keygen -o -t ed25519 -f private-key-ed25519.pem -N '' -C "Some comment" <<<y 2>&1 >/dev/null |
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
| #!/usr/bin/env bash | |
| set -u -e -o pipefail | |
| # INTRODUCTION | |
| # --- | |
| # | |
| # This snippet it aggregrate the `size` of all repositories in an GitHub Orginazation | |
| # to report the total used storage (approximately). | |
| # | |
| # PREREQUISITES |
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
| #!/usr/bin/env bash | |
| set -ueo pipefail | |
| # INTRODUCTION | |
| # ==== | |
| # | |
| # This script was created as I wanted to unarchive multiple repositories in our company. | |
| # Using the Web UI would take lots of time and I was lazy as hell. GitHub Rest API also | |
| # did not support it. | |
| # Luckily, I discovered an article [1] giving hint that GitHub GraphQL API did have a |