Skip to content

Instantly share code, notes, and snippets.

View bopbi's full-sized avatar
💭
🕺 🕺

Bobby Prabowo bopbi

💭
🕺 🕺
View GitHub Profile
@bopbi
bopbi / settings.json
Last active September 7, 2026 01:39
example of claude code settings.json that declare multiple version of model (generated by fable 5.1 and using fake application inference profiles)
{
"model": "arn:aws:bedrock:ap-northeast-1:123456789012:application-inference-profile/g7h8i9j0k1l2",
"awsAuthRefresh": "aws sso login --profile your-profile",
"env": {
"CLAUDE_CODE_USE_BEDROCK": "1",
"AWS_PROFILE": "your-profile",
"AWS_REGION": "ap-northeast-1",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "arn:aws:bedrock:ap-northeast-1:123456789012:application-inference-profile/a1b2c3d4e5f6",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "arn:aws:bedrock:ap-northeast-1:123456789012:application-inference-profile/g7h8i9j0k1l2",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "arn:aws:bedrock:ap-northeast-1:123456789012:application-inference-profile/m3n4o5p6q7r8"
@bopbi
bopbi / plan.md
Last active July 30, 2026 11:50
custom slash command so you never paste that again. Create .claude/commands/plan.md in your repo (or ~/.claude/commands/plan.md to have it in every project):
description Investigate a task and write a self-contained PLAN.md
model fable

Investigate the following task and write an implementation plan to PLAN.md at the repo root. Do not modify any other files.

Task: $ARGUMENTS

The plan will be executed by a separate Claude Code session with no memory of

@bopbi
bopbi / redirect.html
Created December 22, 2024 08:53
Redirect back to app
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Redirecting...</title>
</head>
<body>
<h1>Redirecting you back to the app...</h1>
@Test
fun model_package_is_serialized() {
Konsist.scopeFromProject()
.classes()
.withPackage("com.bobbyprabowo.android.konsistsandbox.model")
.assertTrue {
it.hasParentOf(Serializable::class)
}
}
@bopbi
bopbi / gist:a60699c0d19573f2962fd6bf188249ab
Created April 9, 2024 03:10
Error Google auth linking
[SaveAccountLinkingToken_flowRunner] Flow failed. [CONTEXT service_id=68 ]
fun main() {
val result = GetLatestStringImpl().invoke()
println(result.getOrNull())
}
interface GetLatestString {
operator fun invoke(): Result<String>
}
class GetLatestStringImpl : GetLatestString {
@bopbi
bopbi / gist:aded8534762e728ec9d0e7b25ddd583c
Last active September 28, 2022 14:45
Compile Vernemq on Mac M1

clone vernemq

  • brew install erlang
  • brew install openssl
  • brew install leveldb
  • brew install snappy
  • cd /usr/local/lib/
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.1.dylib
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.a
  • ln -s /opt/homebrew/Cellar/snappy/1.1.9/lib/libsnappy.dylib
@bopbi
bopbi / NullString.go
Created October 10, 2021 08:40
NullString for MySQL datatype
import (
"database/sql/driver"
"fmt"
)
type NullString string
func (str *NullString) Scan(value interface{}) error {
if value == nil {
*str = ""
@bopbi
bopbi / run_lighthttpd.sh
Created May 23, 2021 16:24
run lighthttpd on mac
lighttpd -f /opt/homebrew/etc/lighttpd/lighttpd.conf