Skip to content

Instantly share code, notes, and snippets.

View StephenHodgson's full-sized avatar
👾
Raging against pixels

Stephen Hodgson StephenHodgson

👾
Raging against pixels
View GitHub Profile
@bentman
bentman / Add-DevToMyWinServer.ps1
Last active May 21, 2024 11:36
Script to install Dev Tools on Windows Server 2022
<#
.SYNOPSIS
Script to install Dev Tools on Windows Server (tested on 2022)
.DESCRIPTION
Installs the following from multiple resources:
Microsoft.VCLibs v14.00 (github)
Microsoft.UI v2.8.6 (github)
winget-cli v1.7.11132 (github)
Microsoft.WindowsTerminal v1.19.11213.0 (github)
Microsoft pwsh.exe vCurrent (winget)
@slimsag
slimsag / ramblings.md
Last active December 13, 2023 08:02
Because cross-compiling binaries for Windows is easier than building natively

Because cross-compiling binaries for Windows is easier than building natively

I want Microsoft to do better, want Windows to be a decent development platform-and yet, I constantly see Microsoft playing the open source game: advertising how open-source and developer friendly they are - only to crush developers under the heel of the corporate behemoth's boot.

The people who work at Microsoft are amazing, kind, talented individuals. This is aimed at the company's leadership, who I feel has on many occassions crushed myself and other developers under. It's a plea for help.

The source of truth for the 'open source' C#, C++, Rust, and other Windows SDKs is proprietary

You probably haven't heard of it before, but if you've ever used win32 API bindings in C#, C++, Rust, or other languages, odds are they were generated from a repository called microsoft/win32metadata.

@mmaletin
mmaletin / VRFrameDebuggerFix.cs
Created April 11, 2019 13:38
This script stops new VR poses from being applied when Unity editor is paused. It fixes frame debugger. Add it to camera and controllers, and any other tracked objects.
using UnityEngine;
#if UNITY_EDITOR
using Valve.VR;
using UnityEditor;
#endif
// This script stops new VR poses from being applied when Unity editor is paused.
// It fixes frame debugger. Add it to camera and controllers, and any other tracked objects.
@peted70
peted70 / TMP_SDF-MobileInstanced.shader
Created March 14, 2019 10:05
TextMeshPro Shader updated to work with Single pass stereo rendering in Unity
// Simplified SDF shader:
// - No Shading Option (bevel / bump / env map)
// - No Glow Option
// - Softness is applied on both side of the outline
Shader "TextMeshPro/Mobile/Distance Field Instanced" {
Properties {
_FaceColor ("Face Color", Color) = (1,1,1,1)
_FaceDilate ("Face Dilate", Range(-1,1)) = 0
@WikkidEdd
WikkidEdd / AppLauncher3D.cs
Last active September 18, 2018 17:38
Build process and asset to add 3d app launchers to Hololens apps. Add AppLauncher3DEditor.cs in to an "Editor" folder. Create a new 3DAppLauncher asset in your project and enter the path to your glb.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(fileName="3DAppLauncher", menuName = "3D App Launcher")]
public class AppLauncher3D : ScriptableObject
{
[Tooltip("Path to glb relative to Assets folder. Include file extension")]
public string _Model;
@WikkidEdd
WikkidEdd / UWPLogs.cs
Created August 27, 2018 10:43
Unity script to output to native UWP logs which can then be access via the device portal. Piggy backs on the Microsoft-Windows-Diagnostics-LoggingChannel provider as per this blog post https://blogs.windows.com/buildingapps/2016/06/10/using-device-portal-to-view-debug-logs-for-uwp/
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if NETFX_CORE
using Windows.Foundation.Diagnostics;
#endif
public class UWPLogs : MonoBehaviour {
@ZimM-LostPolygon
ZimM-LostPolygon / UnityGuidRegenerator.cs
Last active February 8, 2024 10:10
Unity asset GUIDs regenerator
// Drop into Assets/Editor, use "Tools/Regenerate asset GUIDs"
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using UnityEditor;
namespace UnityGuidRegenerator {
public class UnityGuidRegeneratorMenu {
@dgroft
dgroft / unity_editor_window_progress_bar.cs
Created February 17, 2014 19:56
Create a progress bar embedded in a Unity editor window
Rect r = EditorGUILayout.BeginVertical();
EditorGUI.ProgressBar(r, 0.1f, "Doing something helpful");
GUILayout.Space(18);
EditorGUILayout.EndVertical();