Skip to content

Instantly share code, notes, and snippets.

View jmbeach's full-sized avatar
🏠

Jared Beach jmbeach

🏠
View GitHub Profile
@jmbeach
jmbeach / Debug.ahk
Last active August 25, 2019 17:42
AutoHotkey Console Log/WriteLine Equivalent
;Inspired by thread:http://www.autohotkey.com/board/topic/103338-best-way-for-debug/?hl=%2Bconsole+%2Blog#entry638264
;Based on script by user Hachi.
;Edit by Jared Beach.
;
; #include this script in a script you want to debug.
; "#Include, ./debug.ahk"
;
; Add debug messages by writing `debug("your message here")`
;
; See live debug messages by running:
@jmbeach
jmbeach / GoogleHotkey.ahk
Last active June 13, 2018 19:04
AutoHotkey Google Search
; Google Search
; Fanatic Guru
; 2014 05 01
; Version: 1.0
;
; Google Search of Highlighted Text
;
;{-----------------------------------------------
; If Internet Explorer is already running it will add search as new tab
;}
@jmbeach
jmbeach / Resharper Floating Windows Always On Top Workaround
Created September 4, 2014 19:00
SRC: http://blog.jetbrains.com/dotnet/2012/09/28/resharper-71-early-access-is-open/ - @andrii, @adam Due to a bug in Visual Studio 2012, using ReSharper in floating windows leads to unpredictable focus switches. Microsoft is aware of the problem but there’s no time estimate for a fix from them. Upon examining a set of floating window usage scena…
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/Housekeeping/SuppressOwnerlessFloatingWindows/IsDisablingIndependentFloating/@EntryValue">False</s:Boolean>
</wpf:ResourceDictionary>
using UnityEngine;
using System.Collections;
using System;
public class PathPoint : MonoBehaviour {
int radius = 10;
public Func<Collider,GameObject, int> TriggerEnterAction;
public Func<Collider, int> TriggerExitAction;
public GameObject ObjectToDetect;
void OnDrawGizmos(){
void Start()
{
// for each node
foreach (var node in Nodes)
{
// get point class and assign your custom trigger function to it
var point = node.GetComponent<PathPoint>();
point.TriggerEnterAction = OnPathPointEnter;
// let it know to only call trigger if this is the object collided
point.ObjectToDetect = gameObject;
int OnPathPointEnter(Collider other,GameObject pathPoint)
{
//_nodeLastVisited++;
_nodeLastVisited = Nodes.IndexOf(pathPoint.transform)+1;
return 0;
}
public static class MyMiniProfiler
{
public static MiniProfilerStep XStep(this MiniProfiler profiler, string operationName)
{
return new MiniProfilerStep(profiler, operationName);
}
}
TglGroup = GameObject.Find("Toggle Group Name").GetComponent<BetterToggleGroup>();
TglGroup.OnChange += TglGroup_OnChange;
//...
void TglGroup_OnChange(Toggle newActive)
{
Debug.Log(string.Format("Toggle {0} selected",newActive.name));
}
@jmbeach
jmbeach / packages.config
Last active March 30, 2016 18:31 — forked from okhiroyuki/packages.config
Packages.Config of Chocolatey
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="vim" />
<package id="atom" />
<package id="vlc" />
<package id="python2" />
<package id="google-chrome-x64" />
<package id="firefox" />
<package id="clover" />
<package id="adobereader" />
@jmbeach
jmbeach / commandline debug.txt
Created March 27, 2016 00:13
Commandline Debug
beginning parse
statementList()
statement()
variableDeclaration()
matching treat
matching id
matching eq
matching expression
expr()
matching primary