Skip to content

Instantly share code, notes, and snippets.

package org.robotlegs.extensions.mvcs
{
import flash.utils.Dictionary;
import org.robotlegs.base.EventMap;
import org.robotlegs.core.IEventMap;
import org.robotlegs.mvcs.Command;
public class AsyncCommand extends Command
{
package org.robotlegs.utilities.remote
{
import com.adobe.serializers.json.JSONDecoder;
import mx.collections.ArrayCollection;
public class JsonRemoteService extends RemoteServiceBase
{
public function JsonRemoteService(rootURL:String = "")
{
// before
mainWindow.menu("File", function(err, file) {
if(err) throw err;
file.openMenu(function(err, menu) {
if(err) throw err;
menu.item("Open", function(err, item) {
if(err) throw err;
item.click(function(err) {
if(err) throw err;
mainWindow.getChild(type('Window'), function(err, dialog) {
/**
* State names are described as a enum or string constants if language doesn't support them (as3 for example).
*/
private enum State {
A, B, C
}
/**
* Current state is always private. If previous state is needed add
* private State prevState;
@hyakugei
hyakugei / AnimatorExtensions.cs
Last active May 12, 2020 16:04 — forked from stonstad/AnimatorExtensions.cs
Unity Animation State Start and Stop Notifications
using System;
using System.Reflection;
using UnityEngine;
public static class AnimatorExtensions
{
/// <summary>Gets an instance method with single argument of type <typeparamref
/// name="TArg0"/> and return type of <typeparamref name="TReturn"/> from <typeparamref
/// name="TThis"/> and compiles it into a fast open delegate.</summary>
/// <typeparam name="TThis">Type of the class owning the instance method.</typeparam>
@hyakugei
hyakugei / MinMaxSliderAttribute.cs
Last active March 18, 2021 03:32 — forked from frarees/MinMaxSliderAttribute.cs
MinMaxSlider for Unity3D
// https://frarees.github.io/default-gist-license
using System;
using UnityEngine;
[AttributeUsage(AttributeTargets.Field, Inherited = true, AllowMultiple = false)]
public class MinMaxSliderAttribute : PropertyAttribute
{
public readonly float min;
public readonly float max;
@hyakugei
hyakugei / installation_instructions.md
Created August 12, 2021 17:27 — forked from DivineDominion/installation_instructions.md
nvALT Preview Template featuring relative paths

Run this from your terminal to execute the setup script. It creates the directory and downloads the template right into this new folder.

curl -s https://gist.githubusercontent.com/DivineDominion/ab1abe8d2b93d4b73d69/raw/6a7066f1fbcf45e3c47a8d85acee475dd33bd32c/install.sh | bash 

Aferwards, you can change the base directory in ~/Library/Application\ Support/nvALT/template.html as expected.