Skip to content

Instantly share code, notes, and snippets.

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

Yoonseop Shin yoonseopshin

🏠
Working from home
View GitHub Profile
@foriequal0
foriequal0 / Continuation Monad.md
Created January 23, 2017 21:21
Continuation Monad

Continuation Monad

이성찬, 2017


Continuation

Continuation제어 흐름 을 구체화 해 first-class citizen으로 다룰 수 있게 한 추상 표현.

@chrisbanes
chrisbanes / code.kt
Last active August 10, 2023 10:46
Night Mode inflater
/*
* Copyright 2017 Google, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@FrancescoJo
FrancescoJo / AndroidRsaCipherHelper.kt
Last active July 5, 2023 03:08
Android RSA cipher helper with system generated key. No more static final String key in our class - an approach which is very vulnerable to reverse engineering attack.
import android.os.Build
import android.security.KeyPairGeneratorSpec
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import android.util.Base64
import timber.log.Timber
import java.math.BigInteger
import java.security.GeneralSecurityException
import java.security.KeyPairGenerator
import java.security.KeyStore
@FrancescoJo
FrancescoJo / SecureSharedPreferences.kt
Last active March 17, 2022 05:32
A SharedPreferences wrapper implementation with encryption/decryption, using CipherHelper implementation.
import android.content.SharedPreferences
/**
* A [android.content.SharedPreferences] wrapper that helps easy reading/writing values.
*
* @author Francesco Jo([email protected])
* @since 22 - Mar - 2018
*/
class SecureSharedPreferences(private val sharedPref: SharedPreferences) {
fun contains(key: String) = sharedPref.contains(key)
@vlio20
vlio20 / StatusCode.kt
Last active September 22, 2024 13:42
Kotlin Http Status Codes enum
package oogaday.commons.enums
enum class StatusCode(val code: Int) {
Continue(100),
SwitchingProtocols(101),
Processing(102),
OK(200),
Created(201),
Accepted(202),
@DavidIbrahim
DavidIbrahim / DashedBorder.kt
Last active August 28, 2024 11:52
dashedBorder modifier for android compose
import androidx.compose.foundation.BorderStroke
/*
* Copyright 2020 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0