Skip to content

Instantly share code, notes, and snippets.

View hymerman's full-sized avatar

Ben Hymers hymerman

View GitHub Profile
# Description: Boxstarter Script
# Original Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2018-12-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
# Description: Boxstarter Script
# Original Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2018-12-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@hymerman
hymerman / boxstarter-buildmachine.ps1
Last active December 19, 2018 16:49
Boxstarter Commands for a new Windows box - used as a build server
# Description: Boxstarter Script
# Original Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2018-12-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@hymerman
hymerman / boxstarter-nondev.ps1
Last active December 2, 2018 19:36 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Original Author: Jess Frazelle <jess@linux.com>
# Last Updated: 2018-12-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@hymerman
hymerman / gist:d8372fd516678347c198943d03f1e348
Created September 9, 2018 22:15
Symbol load information for dxgi.dll, from Visual Studio and from WinDbg
Output from Visual Studio 2017 (15.8.1), Symbol Load Information, just Microsoft Symbol Servers part:
SYMSRV: BYINDEX: 0x4
C:\symbols*https://msdl.microsoft.com/download/symbols
dxgi.dll
50F30FBD5d000
SYMSRV: UNC: C:\symbols\dxgi.dll\50F30FBD5d000\dxgi.dll - path not found
SYMSRV: UNC: C:\symbols\dxgi.dll\50F30FBD5d000\dxgi.dl_ - path not found
SYMSRV: UNC: C:\symbols\dxgi.dll\50F30FBD5d000\file.ptr - path not found
SYMSRV: HTTPGET: /download/symbols/index2.txt
@hymerman
hymerman / gist:8e1f500bb5787092a6d0
Last active August 29, 2015 14:17
Visual Studio Find and Replace Regular Expressions to replace c# 'foreach' loops with 'for' loops
Visual Studio Find and Replace Regular Expressions to replace c# 'foreach' loops with 'for' loops.
Useful for Unity scripts that want to reduce dynamic allocations.
Container is assumed to be List, so 'Count' is used rather than Length - will need fixing up after replacement if this is wrong.
Replacements follow this pattern:
foreach (Type name in container)
{
... becomes:
@hymerman
hymerman / RvoGridGraph.cs
Created March 18, 2015 11:30
RVO grid graph for A* Pathfinding Project Pro
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using Pathfinding;
using Pathfinding.RVO;
/** Adds a GridGraph as RVO obstacles.
* Add this to a scene in which has a GridGraph based graph, when scanning (or loading from cache) the graph
* it will be added as RVO obstacles to the RVOSimulator (which must exist in the scene).
*
@hymerman
hymerman / gist:6858541
Created October 6, 2013 20:12
Regex for finding trailing whitespace
[^\S\r\n]+(?=\r?$)
@hymerman
hymerman / git-rm-ignored-files.sh
Last active December 16, 2015 05:48
Git remove ignored files already added to the repo. This works on windows with msysgit (tested with version 1.8.0.msysgit.0). Leaves deleted files in place because of --cached. The key part is the `-z` which makes ls-files use a null character as the delimiter, which works with xargs' -0 option to separate lines without blowing up on paths with …
#!/bin/sh
git ls-files -i -z --exclude-standard | xargs -0 -r git rm --cached