Skip to content

Instantly share code, notes, and snippets.

View SoftwareGuy's full-sized avatar

Coburn SoftwareGuy

View GitHub Profile
@SoftwareGuy
SoftwareGuy / Platform_AndroidTV.cs
Created December 8, 2023 10:49 — forked from ChrisNZL/Platform_AndroidTV.cs
Detects Android TV using Unity.
using UnityEngine;
// DERIVED FROM https://stewmcc.com/post/check-for-android-tv-in-unity/
public class Platform_AndroidTV : MonoBehaviour {
#if UNITY_ANDROID
sbyte isAndroidTV = -1; // -1 == not checked yet; 0 == false; 1 == true
@SoftwareGuy
SoftwareGuy / EditorFontSize.cs
Created November 3, 2022 01:39 — forked from nukadelic/EditorFontSize.cs
Unity Editor Font Size Changer -- EditorStyles
#if UNITY_EDITOR
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Reflection;
public class EditorFontSize : EditorWindow
{
[MenuItem("Window/Editor Font Size")]
@SoftwareGuy
SoftwareGuy / ⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
Created December 16, 2021 03:18 — forked from ephemient/⁄etc⁄pacman.d⁄hooks⁄linux-modules-post.hook
(Arch Linux) Keep current modules around during kernel upgrade
[Trigger]
Operation = Upgrade
Type = Package
Target = linux
[Action]
Description = Restore Linux kernel modules
When = PostTransaction
Depends = coreutils
Depends = rsync
@SoftwareGuy
SoftwareGuy / CF-U1-BIOS.md
Created June 6, 2021 05:17 — forked from en4rab/CF-U1-BIOS.md
Recovering the BIOS password from a Panasonic CF-U1 mk2 (AMI Aptio UEFI)

Recovering the BIOS password from a Panasonic CF-U1 mk2 (AMI Aptio UEFI)

A mess of my own making

While messing with a CF-U1 handheld PC that I bought off ebay I managed to mess up the BIOS and it seems it reverted to previous settings which included an unknown BIOS password, it would however still boot into windows. Since I could still boot windows I was able to dump the bios flash using AFUWINGUI.EXE the version I used was 3.09.03.1462 which is available here:
https://ami.com/en/?Aptio_4_AMI_Firmware_Update_Utility.zip

@SoftwareGuy
SoftwareGuy / Benchmark.cs
Created December 28, 2020 05:33
Really really really crude NetStack.Buffers vs System.Buffers Shootout for Unity
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using UnityEngine;
// Microsoft NET Buffers
using System.Buffers;
// NX's NetStack Buffers.
using NetStack.Buffers;
public class Benchmark : MonoBehaviour
@SoftwareGuy
SoftwareGuy / ExampleAuthSystem.cs
Created September 17, 2018 04:13
Example Auth System for Mirror/Classic UNET
// This is an example way of making an auth system for Mirror/Classic UNET.
// This is a "kickstart" script that may or may not work for you. NO WARRANTY.
// Code written by SoftwareGuy/Coburn64 (@coburn64 on Twitter). Please don't claim as your own.
// START SNIPPET //
using UnityEngine;
using Mirror; // Change this to "using UnityEngine.Networking" if using classic UNET
public class CustomNetworkManager : NetworkManager {
private int EXAMPLE_AUTH_PACKET_ID = 1000;
@SoftwareGuy
SoftwareGuy / MirrorMigrationTool.cs
Last active April 27, 2021 11:49
Converts old UNET code into modern Mirror Networking code
// Mirror Network Migration Tool
// Written by M. Coburn (@coburn64 on Twitter/SoftwareGuy on Github)
// This file is part of Mirror Networking by Coburn64, Lymdun, vis2k and Paul (goldbug).
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEngine;
@SoftwareGuy
SoftwareGuy / gist:f6ea2ab4420a8255b5e3
Created May 8, 2015 07:04
KCSrv AssertError on new ship
127.0.0.1 - - [08/May/2015 17:01:30] "POST /kcsapi/api_req_init/firstship HTTP/1.1" 500 -
Traceback (most recent call last):
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask/app.py", line 1836, in __call__
return self.wsgi_app(environ, start_response)
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask/app.py", line 1820, in wsgi_app
response = self.make_response(self.handle_exception(e))
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask/app.py", line 1403, in handle_exception
reraise(exc_type, exc_value, tb)
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask/_compat.py", line 33, in reraise
raise value
(kcsrv-sg)coburn@debian-vm:~/Development/kcsrv-sg$ ./manage.py setup
Installing default roles...
Traceback (most recent call last):
File "./manage.py", line 45, in <module>
manager.run()
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/__init__.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/__init__.py", line 383, in handle
res = handle(*args, **config)
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/commands.py", line 216, in __call__
Traceback (most recent call last):
File "./manage.py", line 45, in <module>
manager.run()
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/__init__.py", line 412, in run
result = self.handle(sys.argv[0], sys.argv[1:])
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/__init__.py", line 383, in handle
res = handle(*args, **config)
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_script/commands.py", line 216, in __call__
return self.run(*args, **kwargs)
File "/home/coburn/Development/kcsrv-sg/lib/python3.4/site-packages/flask_migrate/__init__.py", line 178, in upgrade