Skip to content

Instantly share code, notes, and snippets.

View GUIEEN's full-sized avatar

Seung Kwak GUIEEN

  • tokyo
View GitHub Profile
Created May 15, 2023 08:53 — forked from humblehacker/
Make opencv2.xcframework for iOS arm64, and iOSSimulator arm64 & x86_64

I had some trouble attempting to build an XCFramework of OpenCV, but I finally got a successful build with the following steps:

  1. Clone the OpenCV repo:
    git clone
    cd opencv
  2. Disable building with libjpeg-turbo[^1] by applying a patch:
    git apply path/to/opencv-5-28-50.patch
Created April 20, 2023 09:40 — forked from 0xjac/
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare

GUIEEN / decode-json-swift.swift
Created March 28, 2023 07:04 — forked from mikebuss/decode-json-swift.swift
Decode [Any] and [String: Any] Swift 4
// Adapted from:
// Original:
// Adds encoding:
// Adds fix for null inside arrays causing infinite loop:
struct JSONCodingKeys: CodingKey {
var stringValue: String
Created November 18, 2022 15:29 — forked from levi/
Riot LoL eSports Unofficial API Documentation
GUIEEN / gist:35f2f3e257ab281f7c54e405e83535bb
Created November 17, 2022 08:04 — forked from iyuuya/gist:3231301
Objective-C における @Property@synthesize の簡単な説明
// ------------------------------------------------------------------------ //
#pragma mark - 定義ファイル側
@interface SomeClass : NSObject
// ここにメンバ変数を定義できるが、しなくてもよい
// (@synthesize 時に実体となる変数を定義できるため)
NSObject *_apple; // メンバ変数 _apple を定義しておく (後の例示の為)
Created June 8, 2022 06:55 — forked from v3n/
GLFW on OS X starting guide

OpenGL Development on OS X

While it's possible to download packages and install them manually, it's such a hassle. Fortunately for us, OS X has an unofficial package manager called Let's install it. Open you Terminal and paste the following code:

ruby -e "$(curl -fsSL"

Great. Homebrew will automatically install packages to /usr/local. Conveniently, that directory is already in your include and link paths.

GUIEEN / log_with_time.swift
Last active January 25, 2022 06:40
log with time #swift #time #logWithTime
import Foundation
let formatter = DateFormatter()
formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSS "
func log_with_time(_ items: Any...) {
print(formatter.string(from: Date()), terminator: "")
for idx in items.indices {
print(items[idx], terminator: idx == items.count-1 ? "\n" : " ")
GUIEEN / AVPlayer+Scrubbing.swift
Created August 4, 2021 18:43 — forked from shaps80/AVPlayer+Scrubbing.swift
Enables smooth frame-by-frame scrubbing (in both directions) – similar to Apple's applications.
public enum Direction {
case forward
case backward
internal var player: AVPlayer?
private var isSeekInProgress = false
private var chaseTime = kCMTimeZero
private var preferredFrameRate: Float = 23.98
import Foundation
public struct FuseProperty {
let name: String
let weight: Double
public init (name: String) {
self.init(name: name, weight: 1)