Skip to content

Instantly share code, notes, and snippets.

View yosun's full-sized avatar
:octocat:
cal.permute.xyz

yosun

:octocat:
cal.permute.xyz
View GitHub Profile
@yosun
yosun / Coronavirus vs Capitalism.md
Last active April 14, 2020 21:03
Coronavirus vs Capitalism - an open source poem.

Coronavirus vs Capitalism

XX million Americans will be infected.
XX million Americans will lose their jobs.
Now is a great time to invest in the MARKETS that are too big to fail.

A family dies at home, fearing a hospital visit would bankrupt them.
Their bodies will soon be found in refrigerated trucks.

using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
using Vuforia;
using ZXing;
using ZXing.QrCode;
@yosun
yosun / usdz.md
Last active February 4, 2024 01:53
usdz cheatsheet

Notes on https://developer.apple.com/videos/play/wwdc2019/602/

USDZ archive

USDZ is an archive consisting of scene files (usda, usdc, usd) and textures (png/jpg)

  • usda: human readable file (A)
  • usdc: binary computer file (C)
  • usd: both?

apple usd helper python scripts

@yosun
yosun / gist:f5320d3adb935386a1254b410921187b
Created November 13, 2019 09:23
Mac - Convert mp3 in folder to Alexa audio tag SSML friendly format
cd /path/to/target_files
for f in *.*; do echo ffmpeg -i "$f" -ac 2 -codec:a libmp3lame -b:a 48k -ar 24000 -write_xing 0 "${f%.*}"_converted."${f##*.}"; done
remove echo after vetting that the file names are correct
@yosun
yosun / gist:b201edd05f4375003d75126929e75894
Created October 23, 2019 03:40
unity arkit plugin to arfoundation migration
Add
using UnityEngine.XR;
using UnityEngine.XR.ARFoundation;
using UnityEngine.XR.ARKit;
(etc)
UnityARSessionNativeInterface.ARFrameUpdatedEvent -> (instance) ARCameraManager.frameReceived
ARCameraFrameEventArgs -> ARCameraFrameEventArgs
@yosun
yosun / Image2GoogleVision.cs
Created October 4, 2019 02:01
Takes a Unity Texture2D and get a Google Cloud vision annotation response. Please replace api key accordingly and *make sure Google Cloud billing is enabled*
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace GoogleCloudVision {
[System.Serializable]
public class AnnotateImageRequests
{
public List<AnnotateImageRequest> requests;
@yosun
yosun / WWWPost.cs
Last active October 4, 2019 03:15
WWWPost.cs Oct 2019
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
// 2019 Oct 3
public class WWWPost : MonoBehaviour
{
public delegate void WWWDataParseMethod(string s);
{
"breeds":[
{
"name":"Affenpinscher",
"_links":{
"type":{
"href":"\/v2\/types\/dog"
}
}
},
@yosun
yosun / coco.names
Created April 15, 2019 23:39
coco.names from tinyyolo
person
bicycle
car
motorbike
aeroplane
bus
train
truck
boat
traffic light
// Jan 9 version includes rect
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public static class UI2 {
[System.Serializable]