Skip to content

Instantly share code, notes, and snippets.

View comcxx11's full-sized avatar
🍎
매일 감사하는 마음

SEOJIN HONG comcxx11

🍎
매일 감사하는 마음
View GitHub Profile
import CryptoSwift
func encryptAES(message: String, key: String, iv: String) throws -> String {
let data = Data(message.utf8)
let keyData = Data(key.utf8)
let ivData = Data(iv.utf8)
let aes = try AES(key: keyData.bytes, blockMode: CBC(iv: ivData.bytes), padding: .pkcs7)
let encrypted = try aes.encrypt(data.bytes)
@comcxx11
comcxx11 / blog1.bash
Last active May 27, 2023 01:29
20230527
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
@comcxx11
comcxx11 / blog1.swift
Last active May 26, 2023 08:09
20230526
let documentPicker = UIDocumentPickerViewController(documentTypes: ["public.data"], in: .import)
documentPicker.delegate = self
documentPicker.allowsMultipleSelection = false
documentPicker.modalPresentationStyle = .fullScreen
self.present(documentPicker, animated: true, completion: nil)
@comcxx11
comcxx11 / blog0.swift
Last active May 22, 2023 11:23
20230522
box.layer.cornerRadius = 20;
box.layer.masksToBounds = true;
@comcxx11
comcxx11 / Podfile
Created May 4, 2023 00:26
20230504
post_install do |installer|
installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
@comcxx11
comcxx11 / blog1.bash
Created April 29, 2023 06:13
20230429
chown -R root:root folder
@comcxx11
comcxx11 / blog1.bash
Created April 26, 2023 08:27
20230426
$ brew install node
@comcxx11
comcxx11 / blog1.swift
Created April 24, 2023 08:31
20230424
func applicationWillTerminate(_: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
print("[\(LogFile.logFile.getDate())] Application Will Terminate]\n", to: &LogFile.logFile)
// 앱 종료시 자동 로그인이 아니면 위젯 로그아웃
print("isAutoChecked : \(WidgetInterface.isAutoChecked)")
WidgetInterface.logout()
unsubscribeFromTopic()
}
@comcxx11
comcxx11 / blog1.bash
Last active April 22, 2023 12:21
20230422
java -jar [파일명].jar
@comcxx11
comcxx11 / blog1.swift
Created April 20, 2023 05:24
20230420
extension MyWebView: UIScrollViewDelegate {
func scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) {
scrollView.pinchGestureRecognizer?.isEnabled = false
}
}