Skip to content

Instantly share code, notes, and snippets.

@yosun
yosun / Utils.cs
Created June 21, 2022 02:48
opencvunity dlib mods for IC
using AOT;
using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using UnityEngine;
namespace DlibFaceLandmarkDetector.UnityUtils
{
@yosun
yosun / largejson_notes.php
Last active December 12, 2021 10:33
large json file tools php specific
<?php ini_set('memory_limit','512M');set_time_limit(0);
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once( 'vendor/autoload.php' );
// couldn't JsonMachines to work for poly_dump json (250M, with verbose objects)
//use \JsonMachine\JsonMachine;
//$string = file_get_contents("test.json");
query($lat: Float,$lon: Float) {
findLocation(lat: $lat,lon: $lon) {
city
name_string
}
}
{"lat":37.774929,"lon":-122.419418}
@yosun
yosun / chakrar.js
Created March 15, 2021 06:36
#SundayHackDay realityScript Snippet for ChakrAR
/* realityScript is a high-level language I created for rapidly prototyping AR apps in
high-pressure time constraint settings such as hackathons. Due to sleep-loss, I think
in stream of consciousness and so daisy-chaining is key (but I am also very oldskool and love jQuery)...*/
// 0) prepare an Object3D called "ChakraSet" that has the 7 chakras named "red", "orange,"
$("#ChakraSet").AddTags(this.each(),"Chakra");
// 1a) Define chakra symbol textures
var dicChakra = {};
dicChakra["red"]="muladhara.png";
@yosun
yosun / Julius Jones, were he White Like Me.md
Last active January 8, 2021 05:30
Julius Jones, were he White Like Me.

***Julius Jones, were he White Like Me. ***

Julius Jones sits at home, watching TV with his parents.
There’s the delicious smell of a homecooked meal.
The sound of laughter from a witty banter in the kitchen…
—And then the police break in.

They take him at age 19.
He was a football star, full scholarship.

@yosun
yosun / San Francisco in the time of Coronavirus.txt
Created January 7, 2021 20:43
San Francisco in the time of Coronavirus
This poetry is in the public domain.
San Francisco in the time of Coronavirus
That unobstructed view, looking down Market Street,
All the way to the Ferry Building,
@yosun
yosun / The New On-Demand Digital Reich.txt
Created January 7, 2021 19:57
The New On-Demand Digital Reich
Open Source Poetry is in the Public Domain.
The New On-Demand Digital Reich
What if you could post a tweet to summon a mob?
Share a page and have millions
re-share it, re-mix it,
regurgitate en mass.
@yosun
yosun / codesigncheatsheet.md
Last active September 30, 2020 08:38
how to codesign a Unity MacOS .app for self-distribution online

First make sure you have identifiers for MacOS Application signing - grab that certificate from developer.apple.com

See your valid identities, which should list something like "Developer ID Application: Your Developer Name (10 Digit Code)" security find-identity

Code Sign it codesign -f --deep -s "Developer ID Application: Your Developer Name (10 Digit Code)" AppName.app

Check it codesign -dv --verbose=4 AppName.app

@yosun
yosun / 64c939c6-8ae9-4646-bc97-80deea08736a.bsf
Last active September 30, 2020 20:01
.bsf format example
0.093202,EyeBlinkRight,0.1324285;EyeWideRight,0;MouthLowerDownLeft,0.09674008;MouthRollUpper,0.09566025;CheekSquintLeft,0.1162713;MouthDimpleRight,0.09755987;BrowInnerUp,0.2132732;EyeLookInLeft,0.1252181;MouthPressLeft,0.03375453;MouthStretchRight,0.1353138;BrowDownLeft,0.00347129;MouthFunnel,0.106336;NoseSneerLeft,0.122659;EyeLookOutLeft,0;EyeLookInRight,0;MouthLowerDownRight,0.1015166;BrowOuterUpRight,0.0116115;MouthLeft,0.02777758;CheekSquintRight,0.09180645;JawOpen,0.03460217;EyeBlinkLeft,0.1325821;JawForward,0.02649944;MouthPressRight,0.04004911;NoseSneerRight,0.1252758;JawRight,3.981014E-05;MouthShrugLower,0.1429244;EyeSquintLeft,0.134331;EyeLookOutRight,0.01091583;MouthFrownLeft,0;CheekPuff,0.03729479;MouthStretchLeft,0.1497094;TongueOut,0.0003649702;MouthRollLower,0.05108144;MouthUpperUpRight,0.05227803;MouthShrugUpper,0.1611353;EyeSquintRight,0.1342564;EyeLookDownLeft,0.2631951;MouthSmileLeft,0.2097895;EyeWideLeft,0;MouthClose,0.02895156;JawLeft,0.03577858;MouthDimpleLeft,0.09959596;MouthFrownRight,0
@yosun
yosun / Money, Guns, and Viruses.md
Last active April 15, 2020 00:15
Money, Guns, and Viruses - an open source poem

Money, Guns, and Viruses

He had a fever and a dry cough.
It’d pass. He told himself.
The money can’t wait.
The work must be done.

He held a gun out.
For the money.
They screamed.