Skip to content

Instantly share code, notes, and snippets.

View bbarry's full-sized avatar

Bill Barry bbarry

  • Ren Inc
  • Pennsylvania
View GitHub Profile
This file has been truncated, but you can view the full file.
[17:40:36] [main/INFO]: ModLauncher running: args [--username, after_fallout, --version, neoforge-21.1.57, --gameDir, D:\Games\Minecraft\Instances\All the Mods 10 - ATM10, --assetsDir, D:\Games\Minecraft\Install\assets, --assetIndex, 17, --uuid, c25757e534a24802968f0c21f879a369, --accessToken, ❄❄❄❄❄❄❄❄, --clientId, ODUxMzViNTYtZDFhMS00MzJiLTk4ZmMtZTI1NDgwNjdhYmYx, --xuid, 2535410649553087, --userType, msa, --versionType, release, --width, 1024, --height, 768, --quickPlayPath, D:\Games\Minecraft\Install\quickPlay\java\1727214033774.json, --quickPlaySingleplayer, New World, --fml.neoForgeVersion, 21.1.57, --fml.fmlVersion, 4.0.24, --fml.mcVersion, 1.21.1, --fml.neoFormVersion, 20240808.144430, --launchTarget, forgeclient]
[17:40:36] [main/INFO]: JVM identified as Microsoft OpenJDK 64-Bit Server VM 21.0.3+9-LTS
[17:40:36] [main/INFO]: ModLauncher 11.0.4+main.d2e20e43 starting: java version 21.0.3 by Microsoft; OS Windows 10 arch amd64 version 10.0
[17:40:43] [main/INFO]: Loading ImmediateWindowProvider fmlearlyw
@bbarry
bbarry / shapez.ps1
Created November 30, 2021 01:07
powershell script to determine if a shape is buildable
function rotate1($shape) {
$low = $shape -band 0x7777
$high = $shape -band 0x8888
($low -shl 1) + ($high -shr 3)
}
function mirror($shape) {
$a = $shape -band 0x1111
$b = $shape -band 0x2222
$c = $shape -band 0x4444
@bbarry
bbarry / JwtValidationService.cs
Created August 19, 2020 19:02
validate a token according to the asp.net core application's configured options
public class JwtValidationService : ITokenService
{
private readonly JwtBearerOptions _options;
public JwtTokenService(IOptions<JwtBearerOptions> options)
{
_options = options?.Value ?? throw new ArgumentNullException(nameof(options));
}
@bbarry
bbarry / typescript-better-enum.ts
Created July 15, 2020 13:28
typescript building a better enum
// https://github.com/krzkaczor/ts-essentials
import { Opaque } from 'ts-essentials';
export const DIRECTIONS = {
UP: 'Up' as Opaque<'Up', 'DIRECTIONS'>,
DOWN: 'Down' as Opaque<'Down', 'DIRECTIONS'>,
} as const;
export type DIRECTIONS = typeof DIRECTIONS[keyof typeof DIRECTIONS];
module.exports = {
plugins: [
"@typescript-eslint"
],
rules: {
"no-restricted-syntax": [
"error",
{
"selector": "TSEnumDeclaration[const=true]",
"message": "Don't declare const enums"
using System;
using Microsoft.Extensions.DependencyInjection;
namespace ServiceFactory
{
public interface IServiceFactory<T>
{
T GetService();
}
@bbarry
bbarry / example 2
Last active October 20, 2018 01:18
0eNrtvVtuXUmWJDoXfus0/P2Ij/7rGdRfISFQEiOCKAUlUFTgBgoxgB5IT6xHcg+pEM8RtW27mR027m2gfjJTSdL28uVvX7Zs/efVu49fbz7f3949XP3yn1e37z/dfbn65d//8+rL7W931x8f/7+Hvz7fXP1y9evHr7cfrt5c3V3/8fjP9/dfP9wcPt1+vPr7zdXt3Yeb/+fql/j3v95c3dw93D7c3nxDefrHX2/vvv7x7ub++AvPf/7l4f769rffHw7H//p4RP386cvxrz7dPX7wiHQY4c3VX8f/7u3vv9/8hJOecR7//PCPrT+hjP9Wv6P8t7qFk1l74q45hYUpaQ+msjC97ME0vlFtD6fTOHEXZ9A4ebddk8bpu7312JfqKCybQFEePts4SR4/2zhZHkDbOIWbXr0+z698nF9vrj7c3t+8//YLZQu36iNz28CmD81toK6PzW2goQ/ObaDJ+T72qDk/nUb9r9dfHg5HK+++fP50/3B4d/PxYWPsx3b6Qnr5hbb1BWN1T5ure5Ln1TZOlufVNk6R59U2zmn8P8LcHb48fPq8AdKeQd5cHffjh/tPH9++u/n9+s/bT/ePv3N/c/3h7a/3n/54+wRz9cvD/debN98w3z5ifr758Pan/fvP2/uHr09D6Xtbnn7j8G9XR1uPDbv+ZsLV1Zblxp6y7QJjU9kGMnaVbSBjW9kEyoHq3djT/++6N0d5bSjPa0MAR6ukrwZhE0g/pG3j6Ke0bRz9mLaNY8ypbSBjTm0DGXNqG8iYU5tART+qtbEJJB/VAI58VAM48lEN4JwP6pubj4f3v998edjaU77P19af9vJ314/9tIVYf1wLbu++3Nw/HH+yc/z7B/PsfJC2kJu2yvSB8bfOH6XTlnfR8qFZPoJo+RQ9MzX8GuSlZnu41SgvNQAoyUsNAMqa62IW+74W9QND/EBVPzDFD4jzLpYgfqCrH4jiB4b6gSR+YKofyNoHWlA/UMQPRPUD4urdkvqBJn5AnclFnMlNnclFnMl
@bbarry
bbarry / hg.ArgumentCompleters.ps1
Created August 16, 2018 21:54
mercurial argument completion, works in powershell 5.1, should work with TabExpansionPlusPlus; faster (and more limited) than https://github.com/JeremySkinner/posh-hg
# http://www.wtfpl.net/txt/copying/
function isHgDirectory() {
if(test-path ".hg") {
return (Get-Item .).fullname
}
$d = (Get-Item .).parent
while ($d -ne $NULL) {
$p = $d.fullname + "\.hg"
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Serialization;
namespace ConsoleApp2
{
class Program
{
static void Main(string[] args)
0eNrFvduOXDmSLPoveu4oLN7JxsH5iP06aDRSqZAq0KnM3HkpTGOgf98hKSNilWqRbmacjH7p6iopjKST5rwsc/f/+fDx7nX/+HS4f/nw9//5cLh9uH/+8Pf/+p8Pz4cv9zd33//by78f9x/+/uHwsv/64W8f7m++fv+3h8Pd7mn/+XC/f/r3h29/+3C4/7T/7w9/d9/+8bcP+/uXw8th/xPnx7/8+5/3r18/7p+Of+GM8HF/c2zsiPj48Hz868f/e2zrCLFz7W8f/n38Z3TfcY+tPn//k+fH/f7T7uvDp9e7/S58+Lv/9u1vf0H3NroOHkxwJ2PHM/bj4XG/e3nYfXl6eL3/tGWepZyb2UBKZ6T9fz8+7Z+fdy9PN/fPjw9PL7uP+7uXLZPUN8Dl2O9Ph6f97c8/jRvwWYAv2/B5A74I8BmHrwJ8wuHbX+CfH+8OLy/HP9sAjj+BQ/st2dBuEboe8K47J+B7At8L+I7ADwL+QuBHHr82Av/C26eHjw/fYbcQ/W9vyzHU46rZwskITqkmTrFdaTmvYNrfuQrAOx2+2fC5yvB+AeCTDg9sktnr8MAumZoOHwD4rMNHAD7o8Ak4oOjr3mcbfgLdJu16NyPBbcpWHdwmrHMyerD5eppTBd2mqys6us1Wv+joNll90NFtrvqso9tU9U1Ht5kavI5uMzXoVA02VYPO1WBzNetsijZXs86maHO16GyKNleLzqZoc7XobIo2V4vOpmhztepsijZXq86maHO16myKNlebvvNFm6tN52qyudp0riZgX110siYPwOtsTcBz0aLTNUUAXudr+usz0uv9p/3Tz1cp6yHpx9F1/ZD0t/Mj4v3j68uHrQaVh6XTSbn+uTm/hV/095Nfh7N1f091Ar9uTkGTpsBv2ySfp+Dh9aUzB3mRWlxWVrLbcPo70K9j2nyfvLD6+eXm9l+7w/3z/qnzArfg6ycHHLe2Dg22cC88vnv4cnh+Odzubn/fP7/snvb/9/X4z3EL33v+9hf/+flwd/z