Skip to content

Instantly share code, notes, and snippets.

View kwontaewan's full-sized avatar
🥦
Trippy Life

Gunter kwontaewan

🥦
Trippy Life
View GitHub Profile
@iamchiwon
iamchiwon / ASAuthorizationControllerProxy.swift
Last active July 6, 2023 07:37
 Sign in with Apple + Rx
import AuthenticationServices
import RxCocoa
import RxSwift
import UIKit
@available(iOS 13.0, *)
extension ASAuthorizationController: HasDelegate {
public typealias Delegate = ASAuthorizationControllerDelegate
}
@vinczebalazs
vinczebalazs / SheetModalPresentationController.swift
Last active February 1, 2024 04:40
A presentation controller to use for presenting a view controller modally, which can be dismissed by a pull down gesture. The presented view controller's height is also adjustable.
import UIKit
extension UIView {
var allSubviews: [UIView] {
subviews + subviews.flatMap { $0.allSubviews }
}
func firstSubview<T: UIView>(of type: T.Type) -> T? {
allSubviews.first { $0 is T } as? T
@jen6
jen6 / house_finder.ipynb
Last active May 14, 2024 13:39
직방을 크롤링해 전세자금 대출이 가능한 집 알아보기
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@innocarpe
innocarpe / git-pmf
Last active August 12, 2020 02:56
Short git command of `git push origin CURRENT_BRANCH --force`
#!/bin/bash
# This will forch push current branch to origin
# This is just a short version of devxoul's `git pushme` script
# https://gist.githubusercontent.com/devxoul/a972ba0db2a25b989887/raw/f62353501becb274eb63c76b83fbcc01250a 286d/git-pushme
#
# 1. Move this file to ~/.gitsh/
# 2. Add directory path($YOUR_HOME_PATH/.gitsh) to environment variable file
# (like ~/.bash_profile or ~/.zshrc)
# (This would be like 'export PATH=${PATH}:/Users/YOUR_HOME_PATH/.gitsh')
# 3. chmod 0755 git-pmf
@novemberfiveco-gists
novemberfiveco-gists / WKCookieWebView.swift
Last active June 26, 2023 10:02
A WKWebView subclass that passes cookies after a 302 redirect response.
//
// WKCookieWebView.swift
//
// Created by Jens Reynders on 30/03/2018.
// Copyright (c) 2018 November Five
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#oclint xcode include cocoapod project
OCLINT_HOME=/usr/local/Cellar/oclint/0.13
export PATH=$OCLINT_HOME/bin:$PATH
hash oclint &> /dev/null
if [ $? -eq 1 ]; then
echo >&2 "oclint not found, analyzing stopped"
exit 1
@linearhw
linearhw / KingFisher.md
Last active April 24, 2024 05:29
KingFisher 의 기능 요약/정리

KingFisher

데이터 변환

  • Remote > Data & Image

    • URLSession delegate 의 receiveData 로부터 받은 data 를 모은 다음, UIImage(data: scale:) method 사용
  • Data > toDisk

    • data 의 header 를 읽어서 타입(PNG, JPG, GIF)을 판별
    • 위에서 만든 이미지를 다시 타입에 따라 데이터로 또 만들어 줌 (?)
@ElonPark
ElonPark / createWebViewWith.swift
Last active November 20, 2023 09:28
WKWebView에서 자바스크립트로 window.open(), window.close() 하는 경우 처리
/** - 새창 열기, 닫기 예제 **/
///메인으로 사용중인 웹뷰
lazy var webView = WKWebView()
///window.open()으로 열리는 새창
var createWebView: WKWebView?
func webView(_ webView: WKWebView, createWebViewWith configuration: WKWebViewConfiguration, for navigationAction: WKNavigationAction, windowFeatures: WKWindowFeatures) -> WKWebView? {
@hurricane-voronin
hurricane-voronin / README.md
Last active May 23, 2024 11:54
Naming Classes Without a 'Manager'
@eliburke
eliburke / gist:24f06a1590d572e86a01504e1b38b27f
Last active February 4, 2022 05:11
Encrypt/Decrypt functions for AES 256 GCM using OpenSSL for iPhone
// This is 4 year old code, and I have long since switched to PolarSSL
// But I have no reason to believe it is not still valid and functional
#include <openssl/rand.h>
#include <openssl/ecdsa.h>
#include <openssl/obj_mac.h>
#include <openssl/err.h>
#include <openssl/pem.h>
#include <openssl/evp.h>