Skip to content

Instantly share code, notes, and snippets.

View GUIEEN's full-sized avatar
💭
美しい未来に

Seung Kwak GUIEEN

💭
美しい未来に
  • tokyo
View GitHub Profile
@GUIEEN
GUIEEN / make-opencv2-xcframework.md
Created May 15, 2023 08:53 — forked from humblehacker/make-opencv2-xcframework.md
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 git@github.com:opencv/opencv.git
    cd opencv
    
  2. Disable building with libjpeg-turbo[^1] by applying a patch:
    git apply path/to/opencv-5-28-50.patch
@GUIEEN
GUIEEN / private_fork.md
Created April 20, 2023 09:40 — forked from 0xjac/private_fork.md
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 git@github.com:usi-systems/easytrace.git

@GUIEEN
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: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24
// Adds encoding: https://github.com/3D4Medical/glTFSceneKit/blob/master/Sources/glTFSceneKit/GLTF/JSONCodingKeys.swift
// Adds fix for null inside arrays causing infinite loop: https://gist.github.com/loudmouth/332e8d89d8de2c1eaf81875cfcd22e24#gistcomment-2807855
//
struct JSONCodingKeys: CodingKey {
var stringValue: String
@GUIEEN
GUIEEN / riot_esports_api.md
Created November 18, 2022 15:29 — forked from levi/riot_esports_api.md
Riot LoL eSports Unofficial API Documentation
@GUIEEN
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 を定義しておく (後の例示の為)
}
@GUIEEN
GUIEEN / ogl_osx.md
Created June 8, 2022 06:55 — forked from v3n/ogl_osx.md
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 http://brew.sh Let's install it. Open you Terminal and paste the following code:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

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

@GUIEEN
GUIEEN / GithubAPI_Org.md
Last active May 18, 2022 15:06
GithubAPI_Org
  1. Organization
    1. GET
      1. User
        1. All
          1. /user/orgs
            1. public && private
              Status: 200 OK
              Link: <https://api.github.com/resource?page=2>; rel="next",
                  <https://api.github.com/resource?page=5>; rel="last"
              
@GUIEEN
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
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