Skip to content

Instantly share code, notes, and snippets.

View dafinoer's full-sized avatar
🏠
Working from home

Muhammad Dafi dafinoer

🏠
Working from home
View GitHub Profile
@dafinoer
dafinoer / my_default_color_dark.xml
Created October 11, 2023 23:59
iceman default color dark
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#67e100</color>
<color name="on_primary">#153800</color>
<color name="secondary">#bdcbaf</color>
<color name="on_secondary">#283420</color>
<color name="tertiary">#a0cfcf</color>
<color name="on_tertiary">#003737</color>
<color name="error">#ffb4ab</color>
<color name="on_error">#e3e3dc</color>
@dafinoer
dafinoer / my_default_color_light.xml
Created October 11, 2023 23:54
iceman_default_color
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#2e6c00</color>
<color name="on_primary">#ffffff</color>
<color name="secondary">#56624b</color>
<color name="on_secondary">#ffffff</color>
<color name="tertiary">#386666</color>
<color name="on_tertiary">#386666</color>
<color name="error">#ba1a1a</color>
<color name="on_error">#ffffff</color>
@dafinoer
dafinoer / protobuf_setup.gradle
Last active September 10, 2023 17:03
Setup gradle file protobuf Kotlin
android {
sourceSets {
main {
proto {
// Directory Default Proto
srcDir 'src/main/proto'
}
}
}
}
@dafinoer
dafinoer / answer.md
Created June 19, 2023 04:57
the answer

Jawaban Soal No 2

productFlavors {
development {
dimension "app"
applicationIdSuffix ".dev"
versionNameSuffix "-dev"
manifestPlaceholders = [
appName : "CUiT-Dev",
appScheme : "cuit-app",
icemanApplication: "com.gocuit.cuit.dev"
]
E/ExportTask(31787): Error while export
E/ExportTask(31787): android.media.MediaCodec$CodecException: Error 0xfffffc0e
E/ExportTask(31787): at android.media.MediaCodec.native_configure(Native Method)
E/ExportTask(31787): at android.media.MediaCodec.configure(MediaCodec.java:2127)
E/ExportTask(31787): at android.media.MediaCodec.configure(MediaCodec.java:2043)
E/ExportTask(31787): at com.banuba.sdk.core.encoding.MediaEncoderVideo.prepare(MediaEncoderVideo.java:74)
E/ExportTask(31787): at com.banuba.sdk.core.encoding.MediaMuxerWrapper.prepare(MediaMuxerWrapper.java:128)
E/ExportTask(31787): at com.banuba.sdk.export.internal.EncodingBundle.<init>(EncodingBundle.java:52)
E/ExportTask(31787): at com.banuba.sdk.export.internal.ExportTask.execute(ExportTask.kt:167)
E/ExportTask(31787): at com.banuba.sdk.export.internal.ExportManager.tryExport(ExportManager.kt:95)
@dafinoer
dafinoer / main.dart
Last active July 13, 2022 05:02
find name if exist
import 'dart:convert';
void main() {
}
/*
* given static list of string containing people names,
* find if name exists in list
* example
if(keystoreProperties['storeFile']){
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
} else {
storeFile file('DevKeyStore.jks')
storePassword 'xxxxx'
keyAlias 'alias your app'
keyPassword 'xxxx'
class PdfUtil {
final doc = pdf.Document();
final PdfPageFormat? formatPage;
PdfUtil(this.formatPage);
Future<Uint8List> buildPdf(pdf.Widget widget) {
doc.addPage(pdf.Page(
build: (pdf.Context context) => widget,
pageFormat: formatPage,
@freezed
class Playback with _$Playback {
factory Playback({
required String policy,
required String id,
}) = _Playback;
factory Playback.fromJson(Map<String, dynamic> data) =>
_$PlaybackFromJson(data);
}