Skip to content

Instantly share code, notes, and snippets.

Louis Hong TheLouisHong

View GitHub Profile
@TheLouisHong
TheLouisHong / Reference.cs
Created May 20, 2018 — forked from Lazersquid/Reference.cs
Unity generic scriptable object variable reference pattern
View Reference.cs
using System;
/// <summary>
/// Reference Class.
/// </summary>
[Serializable]
public abstract class Reference
{
}
@TheLouisHong
TheLouisHong / SimpleMessage.cs
Last active Nov 25, 2017
SimpleMessage: A performant alternative to SendMessage in Unity. (A simple wrapper around the Unity UI event system)
View SimpleMessage.cs
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 Jul 4, 2017
Louis Hong .tmux.conf
View ..README.md

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 Jul 4, 2017
Louis Hong .bashrc
View ..README.md

Louis Hong .bashrc

Really barebone .bashrc that's useful for everyone.

How to install

Copy paste into your ~ directory

How to use

@TheLouisHong
TheLouisHong / GameboyFX.cs
Created Jun 4, 2017
Retry-gameboy looking image-fx in unity3d
View GameboyFX.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_5_4_OR_NEWER
[ImageEffectAllowedInSceneView]
#endif
[RequireComponent(typeof(Camera)), DisallowMultipleComponent, ExecuteInEditMode]
[AddComponentMenu("Effects/GameboyFX", -1)]
public class GameboyFX : MonoBehaviour {
@TheLouisHong
TheLouisHong / chrome-ssh-custom-css.css
Last active Sep 4, 2017 — forked from jmoreman/chrome-ssh-custom-css.css
Chrome Secure Shell Powerline Font
View chrome-ssh-custom-css.css
@font-face {
font-family: 'DejaVu Sans Mono Powerline';
font-style: normal;
font-weight: normal;
src: local('DejaVu Sans Mono Powerline'), url('https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/DejaVuSansMono/Regular/complete/DejaVu%20Sans%20Mono%20for%20Powerline%20Nerd%20Font%20Complete%20Mono.ttf') format('truetype');
}
body {
font-family: 'DejaVu Sans Mono Powerline' !important;
}
@TheLouisHong
TheLouisHong / 0_README.md
Last active May 22, 2017
Matthew Mead's DigiPen website readability optimization with custom CSS/JS
View 0_README.md

About

I spent some time to optimize Meads website for readability. This CSS provides more readable fonts, eye strain reducing layout and makes sections of texts easier to distinguish.

Nothing revolutionary, it just something makes my day slightly better. ❤️

Installation

Option 1: Styler Chrome Extension

  1. Install chrome extension Styler
  2. Visit meads website
  3. Copy the inject CSS into styler.
@TheLouisHong
TheLouisHong / SharedMaterialReinstantiater.cs
Created Jul 24, 2016
Modifying Material.sharedMaterial will change the .mat file. Add this script to any object you don't want this to happen to.
View SharedMaterialReinstantiater.cs
using UnityEngine;
using System.Collections;
using Vexe.Runtime.Extensions;
using MaterialCache = System.Collections.Generic.Dictionary<UnityEngine.Material, UnityEngine.Material>;
public class SharedMaterialReinstantiater : MonoBehaviour {
private static readonly MaterialCache _cache = new MaterialCache();
void Awake() {
@TheLouisHong
TheLouisHong / DownloadMixamoByLouisHong.js
Last active Apr 21, 2018
Downloads all the free Mixamo Animations
View DownloadMixamoByLouisHong.js
// Anonymous "self-invoking" function
alert("Thank you for using this script created by Louis Hong (/u/loolo78)\n\nThe download will now begin.");
(function() {
// Load the script
var script = document.createElement("SCRIPT");
script.src = 'https://code.jquery.com/jquery-latest.min.js';
script.type = 'text/javascript';
document.getElementsByTagName("head")[0].appendChild(script);
View blah.shader
Shader "Custom/Circle" {
Properties
{
_Scale("Scale", Float) = 1
}
SubShader{
Blend SrcAlpha OneMinusSrcAlpha
Pass{
CGPROGRAM
#pragma vertex vert
You can’t perform that action at this time.