Skip to content

Instantly share code, notes, and snippets.

View derysudrajat's full-sized avatar

Dery Sudrajat derysudrajat

View GitHub Profile
@derysudrajat
derysudrajat / eid.kt
Created May 12, 2021 16:57
Eid Mubarak
import java.time.LocalDate
import java.time.chrono.HijrahDate
import java.time.format.DateTimeFormatter
import java.time.temporal.TemporalAdjusters
fun main() {
when (isLastRamadhan()) {
true -> {
println("it's felt so fast we passed this month, but happy...")
message.forEach { repeat(35) { loop ->
fun forgetPassword(email: String, isSuccess: (Boolean, message: String) -> Unit) {
Firebase.auth.sendPasswordResetEmail(email)
.addOnCompleteListener {
if (it.isSuccessful) isSuccess(true, "Berhasil Dikirim")
else isSuccess(false, DataHelpers.errorLoginMessage[it.exception?.message] ?: "")
}
}
@derysudrajat
derysudrajat / pet-paradise.ipynb
Last active March 28, 2021 19:36
pet-paradise.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@derysudrajat
derysudrajat / anim_like.xml
Last active November 5, 2020 18:24
Animated Vector Drawable
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="800"
android:interpolator="@android:anim/overshoot_interpolator">
<scale
android:fromXScale="1.3"
android:fromYScale="1.3"
android:pivotX="50%"
android:pivotY="50%"
@derysudrajat
derysudrajat / .travis.yml
Created October 30, 2020 11:47
Travis yml Configuration
language: android
jdk: oraclejdk8
envi:
global:
- ANDROID_API_LEVEL=30
- ANDROID_BUILD_TOOLS_VERSION=30.0.2
android:
licenses:
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
package com.derysudrajat.jdbc;
public class Data {
private int id;
private String nama;
private String alamat;
private String phone;
public Data(int id, String nama, String alamat, String phone) {
this.id = id;
package com.derysudrajat.customdialog
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.DefaultItemAnimator
import com.bumptech.glide.Glide
import com.google.android.material.bottomsheet.BottomSheetDialog
import kotlinx.android.synthetic.main.activity_main.*
import kotlinx.android.synthetic.main.item_bottom_sheet.view.*
package com.derysudrajat.customdialog
import android.content.Context
import android.content.Intent
import android.net.Uri
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.recyclerview.widget.RecyclerView
import com.bumptech.glide.Glide
package com.derysudrajat.customdialog
data class ItemDialog(
val img: String,
val text: String,
val url: String
)
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<androidx.cardview.widget.CardView