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

Welcome to San Francisco!

Getting around town

Walk to Fisherman's Wharf by going down the hill and taking a left on Columbus. Or take a right to check out North Beach. We advise against taking taxis – instead, enjoy your first ride free on Lyft (use code STANFORD5) and Uber (use code nedzy).

Dining

Checking out

Cleaners will be coming at 2pm the day of your checkout. If you need to stay later, please coordinate with us. If you're heading to the airport, we suggest scheduling a ride on Wingz. Visit wingz.me/invite/223846 for $5 off your ride.

@solariz
solariz / alexa_skill_example.php
Last active November 9, 2019 00:30
Amazon Echo / Alexa Intent example in PHP with Security validation
<?php
/* This is a simple PHP example to host your own Amazon Alexa Skill written in PHP.
In my Case it connects to my smarthome Raspberry pi Cat Feeder with two intents;
1: Dispense Food to the cats.
2: When did the Feeder last time feed the cats? Return a spoken time / date
This Script contains neccessary calls and security to give you a easy to use DIY example.
v2016.12.29
Details in my Blogpost: https://solariz.de/de/amazon-echo-alexa-meets-catfeeder.htm
*/
@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;
@vmchar
vmchar / ReplaceDelegatePostProcess.cs
Created November 17, 2018 20:46
Unity3D iOS post build process to replace app delegate source
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
using UnityEngine;
namespace QuickActionsiOS
{
public class ReplaceDelegatePostProcess : ScriptableObject
{
/// <summary>
@olokobayusuf
olokobayusuf / MultiCameraInput.cs
Last active April 9, 2020 03:54
Pseudocode example illustrating recording multiple game cameras with NatCorder.
/*
* NatCorder
* Copyright (c) 2019 Yusuf Olokoba
*/
namespace NatCorder.Inputs {
using UnityEngine;
using System;
using Clocks;
# Read more about setting it up
# https://medium.com/@ljmocic/running-a-script-from-s3-on-ec2-with-7-lines-of-code-59806c07d300
import boto3
REGION = 'us-east-1'
AMI = 'ami-00b94673edfccb7ca'
INSTANCE_TYPE = 'm3.medium'
BUCKET = 'script-bucket'
@itsderek23
itsderek23 / booklet_ai_policy.json
Created March 19, 2020 21:36
Booklet.ai AWS JSON Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"sagemaker:ListEndpointConfigs",
"sagemaker:DescribeEndpointConfig",
"sagemaker:ListModels",
@vad710
vad710 / AnchorTargetListener.cs
Last active March 12, 2022 16:49
Class that takes the content from a Vuforia Image target and puts it inside of a ground plane stage
using UnityEngine;
using Vuforia;
public class AnchorTargetListener : MonoBehaviour, ITrackableEventHandler
{
//The Goal of this class is to automatically Initiate a Ground Plane when the Image Target is detected
// Use this classs in combination with the PlaceContentFromImageTarget if you want to move the content
// of an image target onto the Ground Plane Stage
@threepointone
threepointone / alternative.md
Last active July 31, 2022 17:46
list of things that don't do what they say they do

(also know as lies and/or alternative facts)

js

  • setImmediate - doesn't set anything immediately, waits for a tick before executing
  • setTimeout(fn, n) - never sets the timeout to exactly n
  • Math.random() - computers cannot generate random numbers
  • Promise - is a lie when rejected
  • Array.reduce - accumulates, does not reduce (via @sbmadhav)
@mandarinx
mandarinx / FullscreenPlayMode.cs
Created June 23, 2016 21:53
Fullscreen game view in Unity
using UnityEditor;
using UnityEngine;
using System.Collections;
[InitializeOnLoad]
public class FullscreenPlayMode : MonoBehaviour {
//The size of the toolbar above the game view, excluding the OS border.
private static int tabHeight = 22;