Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Yamin Siahmargooei yamin8000

💭
I may be slow to respond.
View GitHub Profile
@yamin8000
yamin8000 / !CsvFromListMain.kt
Last active Apr 12, 2022
Create CSV from a Kotlin List
View !CsvFromListMain.kt
fun main() {
val firstCategory = Category(0, "Phone")
val secondCategory = Category(1, "Laptop")
val categories = listOf(firstCategory, secondCategory)
val csv = csvOf(
listOf("id", "name"),
categories
) {
listOf(it.id.toString(), it.name)
}
@yamin8000
yamin8000 / OkHttpLambdaAsyncCallback.kt
Created Jun 30, 2021
OkHttp/Retrofit async call with lambda callback
View OkHttpLambdaAsyncCallback.kt
package com.github.yamin8000.fare.model
import android.os.Bundle
import com.github.yamin8000.fare.databinding.ActivityMainBinding
import com.github.yamin8000.fare.ui.BaseActivity
import com.github.yamin8000.fare.web.Services
import com.github.yamin8000.fare.web.WEB
class MainActivity : BaseActivity() {