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
<?php
/*// a quick'n'dirty php-only universal script
// that fetches the latest $total_pages*100 tweets
// containing the word $query
// coded live during #VMWorld during the #vHunt as an
// unofficial count of the number of tweets per participant
// hacked on an iPhone with ZAGG bluetooth keyboard
@yosun
yosun / PenTest.cs
Created September 4, 2012 06:16
Trying to build a jar wrapper for some SPen functions...
package com.testing123.pentest;
import com.unity3d.player.UnityPlayerActivity;
import java.util.HashMap;
import android.app.Activity;
import android.content.Context;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
@yosun
yosun / parse.php
Created September 7, 2012 23:21
hash aggregator
<?php
if($query!=''){
$blurb = array();
for($i=1;$i<=10;$i++){
$blurb[$i] = file_get_contents('http://search.twitter.com/search.json?page='.$i.'&rpp=100&q='.$query);
}
@yosun
yosun / JSONObject
Created September 9, 2012 18:34
JSONObject
#define READABLE
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/*
* http://www.opensource.org/licenses/lgpl-2.1.php
* JSONObject class
* for use with Unity
@yosun
yosun / AlphaBlocks.jsx
Created January 18, 2013 07:17
Alphabet block generator Photoshop Script (jsx) - Loop through and create a centered character for each character in @str, uses background defined by @fileRef, and saves everything in @fileLoc/str[i].png
// Loop through and create a centered character for each character in @str, uses background defined by @fileRef, and saves everything in @fileLoc/str[i].png
// of all the characters on the keyboard, apparently : is the only character you cannot start a filename with ... :.png is invalid (manually excepted to colon.png)!
// @yosun 1/27/2013 11:11
var originalUnit = preferences.rulerUnits;
preferences.rulerUnits = Units.PIXELS;
var docRef; var artLayerRef; var textItemRef;
var type="diffuse";
using UnityEngine;
using System.Collections;
public class IntelPerC : MonoBehaviour {
// v0.11
// voice - dictation/resetdictation
// gesture - returns conf, openness, worldposition, normal
// face - rect

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@yosun
yosun / Mathf2.cs
Last active August 29, 2015 13:56
some useful helper math functions
using UnityEngine;
using System.Collections;
public class Mathf2 {
public static RaycastHit WhatDidWeHit(Vector2 v){
Ray ray = Camera.main.ScreenPointToRay (v);
RaycastHit hit = new RaycastHit ();
hit.point = FarFarAway;
if(Physics.Raycast(ray, out hit,3000f)){
@yosun
yosun / spiralgolf.py
Last active August 29, 2015 14:15 — forked from zrnsm/gist:3c00ce870128e4176ce3
spiral golf in 181 chars
n,r,c=31,range,'x '
s=map(r,[n]*n)
def f(x):
q=r(x,n-x)
for i in q:
for j in q:s[i][j]=c[x%2]
for i in r(0,n/2,2):f(i),f(i+1);s[i+2][i+1],s[i+1][i]=c
for r in s:print' '.join(r)
@yosun
yosun / arkitfacemesh.obj
Last active November 8, 2017 13:21
sample face mesh based on my face generated from arkit iphonex https://developer.apple.com/documentation/arkit/arfacegeometry
g ARFaceMeshManager
v -0.0001029222 -0.02701414 -0.05503087
v -9.985825E-05 -0.02928277 -0.05665697
v -0.000120165 -0.02432592 -0.05374158
v -0.0001382973 -0.02188213 -0.05305533
v -0.0001613813 -0.01988834 -0.0530135
v -0.0001966723 -0.01697339 -0.05568298
v -0.0002091445 -0.01271136 -0.06034805
v -0.0002085566 -0.008412322 -0.0625201
v -0.0002065404 -0.00307607 -0.06267682