Skip to content

Instantly share code, notes, and snippets.

View SoftwareGuy's full-sized avatar

Coburn SoftwareGuy

View GitHub Profile
@SoftwareGuy
SoftwareGuy / gist:f1b51aa6906187a58832
Created February 17, 2015 06:29
Plesk 12 PHP 5.5.21
#!/bin/bash
# Script adapted from existing script : https://gist.github.com/Stayallive/92e841e7dd89c8509c15
# Make sure you are up to date
yum -y update && yum -y install wget
# Install EPEL repository
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
# Get us a clean working directory
@SoftwareGuy
SoftwareGuy / gist:5a4f093b41dba7e586f1
Created April 13, 2015 06:13
Example of KanColle's BS API JSON
[8] => Array
(
[api_id] => 9
[api_sortno] => 11
[api_name] => 吹雪
[api_yomi] => ふぶき
[api_stype] => 2
[api_afterlv] => 20
[api_aftershipid] => 201
[api_taik] => Array
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
(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__
@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
@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 / 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 / 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 / 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 / ⁄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