Skip to content

Instantly share code, notes, and snippets.

@TheLouisHong
TheLouisHong / WSAPI5.cs
Created April 24, 2024 05:58
A C# Runtime for WSAPI5, streams PCM byte array to stdout, reads commands using stdin
using System;
using System.IO;
using System.Speech;
using System.Speech.Synthesis;
using System.Speech.AudioFormat;
public class WSAPI5
{
public static void Main() {
@TheLouisHong
TheLouisHong / speech.h
Created April 22, 2024 05:51
Windows Speech API 4 speech.h
/************************************************************************
Speech.H - Header file to use the Microsoft Speech APIs.
Copyright 1994 -1998 by Microsoft corporation.All rights reserved.
*/
#ifndef _SPEECH_
#define _SPEECH_
// Disable the warning for zero-length arrays in structures
@TheLouisHong
TheLouisHong / sapi.h
Created April 22, 2024 05:47
Windows Speech API 5.1 SDK sapi.h
#pragma warning( disable: 4049 ) /* more than 64k source lines */
/* this ALWAYS GENERATED file contains the definitions for the interfaces */
/* File created by MIDL compiler version 6.00.0347 */
/* Compiler settings for sapi.idl:
Oicf, W1, Zp8, env=Win32 (32b run)
protocol : dce , ms_ext, c_ext
@TheLouisHong
TheLouisHong / suno.ai-widen.user.js
Last active April 6, 2024 01:17
Suno.ai Widen UI
// ==UserScript==
// @name Suno.ai Widen UI
// @version 2024-04-05
// @description Widens suno.ai's song generation panel
// @author Louis Hong
// @match *://app.suno.ai/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=suno.ai
// @grant GM_addStyle
// ==/UserScript==
@TheLouisHong
TheLouisHong / oracle-docs-styler.user.js
Last active April 12, 2024 07:40
TamperMonkey - Oracle Docs Styler
// ==UserScript==
// @name Oracle Docs Styler
// @version 2024-04-03
// @description Styles Oracle Docs
// @author Louis Hong
// @icon https://docs.oracle.com/favicon.ico
// @match *://docs.oracle.com/*
// @match *://google.github.io/*/api-docs/*/javadoc/*
@TheLouisHong
TheLouisHong / java_function_object_signatures.txt
Created April 3, 2024 13:06
Java: Table of Function Objects Signatures (Callable, Runnable, Function, ...)
Supplier () -> x
Consumer x -> ()
BiConsumer x, y -> ()
Callable () -> x throws ex
Runnable () -> ()
Function x -> y
BiFunction x,y -> z
Predicate x -> boolean
UnaryOperator x1 -> x2
BinaryOperator x1,x2 -> x3
@TheLouisHong
TheLouisHong / Reference.cs
Created May 20, 2018 14:14 — forked from Lazersquid/Reference.cs
Unity generic scriptable object variable reference pattern
using System;
/// <summary>
/// Reference Class.
/// </summary>
[Serializable]
public abstract class Reference
{
}
@TheLouisHong
TheLouisHong / SimpleMessage.cs
Last active July 13, 2023 12:28
SimpleMessage: A performant alternative to SendMessage in Unity. (A simple wrapper around the Unity UI event system)
using UnityEngine;
using UnityEngine.EventSystems;
public static class SimpleMessage
{
public delegate void EventFunction<T1,T2>(T1 handler, T2 eventData);
public static bool Send<T,T2>(GameObject target, object eventData, EventFunction<T, T2> functor)
where T : IEventSystemHandler
{
@TheLouisHong
TheLouisHong / ..README.md
Last active July 4, 2017 02:50
Louis Hong .tmux.conf

Louis Hong .tmux.conf

Really barebone .tmux.conf that's useful for everyone.

How to install

Copy paste into your ~ directory

How to use

@TheLouisHong
TheLouisHong / ..README.md
Last active July 4, 2017 03:03
Louis Hong .bashrc

Louis Hong .bashrc

Really barebone .bashrc that's useful for everyone.

How to install

Copy paste into your ~ directory

How to use