Skip to content

Instantly share code, notes, and snippets.

View TuenTuenna's full-sized avatar
😍
Happy coding 👏

개발하는 정대리 TuenTuenna

😍
Happy coding 👏
View GitHub Profile
@TuenTuenna
TuenTuenna / urlSession-cheatSheet.md
Created October 31, 2022 15:01
URLSession CheatSheet
@TuenTuenna
TuenTuenna / dummy-html.md
Created September 28, 2022 02:57
dummy-html
<html>
<!-- Text between angle brackets is an HTML tag and is not displayed.
Most tags, such as the HTML and /HTML tags that surround the contents of
a page, come in pairs; some tags, like HR, for a horizontal rule, stand
alone. Comments, such as the text you're reading, are not displayed when
the Web page is shown. The information between the HEAD and /HEAD tags is
not displayed. The information between the BODY and /BODY tags is displayed.-->
<head>
<title>Enter a title, displayed at the top of the window.</title>
@TuenTuenna
TuenTuenna / uiview+preview+ext.md
Created September 21, 2022 06:16
ios uikit UIView preview Ext
import Foundation
import UIKit

#if DEBUG
import SwiftUI

extension UIView {
@TuenTuenna
TuenTuenna / calculateTwoTimeDifference.md
Created September 20, 2022 09:29
Swift 시간 비교하기
extension Date {

    static func -(recent: Date, previous: Date) -> (month: Int?, day: Int?, hour: Int?, minute: Int?, second: Int?) {
        let day = Calendar.current.dateComponents([.day], from: previous, to: recent).day
        let month = Calendar.current.dateComponents([.month], from: previous, to: recent).month
        let hour = Calendar.current.dateComponents([.hour], from: previous, to: recent).hour
        let minute = Calendar.current.dateComponents([.minute], from: previous, to: recent).minute
        let second = Calendar.current.dateComponents([.second], from: previous, to: recent).second
@TuenTuenna
TuenTuenna / scenePhase.md
Created August 29, 2022 13:14
SwiftUi 앱 라이프사이클
import SwiftUI

@main
struct ScenePhaseApp: App {
    
    @Environment(\.scenePhase) var scenePhase
 
@TuenTuenna
TuenTuenna / nextjs-config.md
Last active August 20, 2022 15:30
nextjs config - 업로드한 이미지 안보일때
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: true,
  images: {
      domains: [
          'www.notion.so',
          'images.unsplash.com',
          's3.us-west-2.amazonaws.com'
 ],
@TuenTuenna
TuenTuenna / compose lazy staggered grid.md
Created July 26, 2022 08:04
compose lazy staggered grid

콤포즈 lazy staggered grid

@Composable
fun LazyStaggeredGrid(
    columnCount: Int,
    contentPadding: PaddingValues = PaddingValues(0.dp),
    content: @Composable LazyStaggeredGridScope.() -> Unit,
) {
@TuenTuenna
TuenTuenna / getRandomColor.md
Last active July 26, 2022 08:00
Android Compose random 칼라 가져오기 입니다

Android Compose random 칼라 가져오기 입니다

익스텐션에 추가해 줍니다.

import androidx.compose.ui.graphics.Color
import kotlin.random.Random

// 랜덤 칼라 가져오기 
fun Color.Companion.random() : Color {
@TuenTuenna
TuenTuenna / not lazy staggeredGrid.md
Last active July 26, 2022 04:53
compose staggeredGrid not lazy

콤포즈 staggered grid not lazy

@Composable
fun StaggeredVerticalGrid(
  modifier: Modifier = Modifier,
  columnCount: Int = 2,
  content: @Composable () -> Unit
) {