Skip to content

Instantly share code, notes, and snippets.

View bopbi's full-sized avatar
💭
🕺 🕺

Bobby Prabowo bopbi

💭
🕺 🕺
View GitHub Profile
@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
mock runnable
java:
doAnswer(invocation -> {
final Runnable test = (Runnable) invocation.getArguments()[0];
test.run();
return null;
}).when(mockedDaoSession).runInTx(any());
kotlin:
@leo0263 the content happy path is not working properly using idprodtest account
import io.reactivex.Observable
import io.reactivex.subjects.BehaviorSubject
fun main() {
View()
}
class View {