Skip to content

Instantly share code, notes, and snippets.

@keijiro
keijiro / houdini_engine.md
Last active January 26, 2018 19:34
Personal notes on Houdini Engine for Unity

Creating a Houdini asset

  • Select a group of nodes or a subnet node.
  • "Assets" -> "New Digital Asset From Selection..."

A Houdini asset file (.hdalc) will be created in the asset library directory ($HOUDINI_PATH/otls). To maintain this file within the Git repository, it should be moved into the project asset directory ($HIP/otls).

@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 19, 2024 07:58
Swift Concurrency Manifesto
@sooop
sooop / StreamReader.swift
Last active May 28, 2023 13:00
Read a large text file line by line - Swift 3
import Foundation
class StreamReader {
let encoding: String.Encoding
let chunkSize: Int
let fileHandle: FileHandle
var buffer: Data
let delimPattern : Data
var isAtEOF: Bool = false
@dealforest
dealforest / slack.py
Last active January 24, 2018 01:53
send to slack in LLDB
#!/usr/bin/env python
import lldb
def slack(debugger, command, result, internal_dict):
frame = lldb.debugger.GetSelectedTarget().GetProcess().GetSelectedThread().GetSelectedFrame()
path = command
lldb.debugger.HandleCommand("""
expr -l swift --
//
// RootViewController.swift
// iOS9Sampler
//
// Created by Shuichi Tsutsumi on 2015/06/10.
// Copyright © 2015 Shuichi Tsutsumi. All rights reserved.
//
import UIKit
@codelynx
codelynx / simd+ext.swift
Last active November 17, 2021 18:56
swift: float4x4 extension to scale, rotate, translate 4x4 matrix
//
// simd+ext.swift
//
// Created by Kaz Yoshikawa on 11/6/15.
//
//
import Foundation
import simd
import GLKit
@schickling
schickling / UIImageFixedOrientationExtension.swift
Last active February 4, 2024 15:00
Extension to fix orientation of an UIImage (Sets orientation to portrait)
extension UIImage {
func fixedOrientation() -> UIImage {
if imageOrientation == UIImageOrientation.Up {
return self
}
var transform: CGAffineTransform = CGAffineTransformIdentity
@voluntas
voluntas / shiguredo_product_ strategy.rst
Last active April 16, 2024 13:24
時雨堂を支える製品戦略
@toddheasley
toddheasley / UIImage.swift
Last active December 2, 2020 15:32
Animated GIF Support for UIImage
import UIKit
extension UIImage {
public enum GIFBehavior {
case unclamped, clamped(TimeInterval), webkit
fileprivate func duration(_ properties: Any?) -> TimeInterval? {
// Look for specified image duration; always prefer unclamped delay time
guard let properties: [String: Any] = (properties as? [String: Any])?["{GIF}"] as? [String: Any],
@royshil
royshil / SimpleVideoStabilizer.cpp
Last active May 8, 2024 05:49
A simple video stabilizer in OpenCV, based on goodFeaturesToTrack, calcOpticalFlowPyrLK and estimateRigidTransform.
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/video/video.hpp>
#include <iostream>
using namespace cv;
using namespace std;