Skip to content

Instantly share code, notes, and snippets.

View No3371's full-sized avatar

BA No3371

View GitHub Profile
@No3371
No3371 / NiER-Light-Source.theme.css
Last active April 3, 2024 18:49
A minor modification to make the Nier Discord theme readable for non Latin languages.
/**
* @name NieR: Automata UI Light
* @version 1.4
* @description Glory to Mankind. ||
* Thanks to JulioDRai for letting me use their cursors!
* ~https://www.deviantart.com/juliodrai ||
* Thanks to GOmonkeymanGO for letting me use some of their code
* ~https://github.com/ChaseIngebritson/YoRHa-Discord-Theme ||
* @website https://github.com/AccraZed/YoRHA-UI-BetterDiscord
* @author Accrazed#2710
@No3371
No3371 / VirusTotal_Multi.ps1
Last active January 14, 2024 19:41
The powershell scripts expects file paths as arguments and upload the files to VirusTotal API endpoints, and expects a file named VirusTotal_API_KEY which the content will be used as the API key. The additional bat file enables "drag&drop to scan" on Windows. All 3 files are supposed to be in same directory.
$API_KEY = Get-Content (Join-Path -Path $PSScriptRoot -ChildPath "VirusTotal_API_KEY");
# Hashtable to hold filepaths and their corresponding sha256s
$sha256s = [ordered]@{}
$failed = @()
foreach ($file in $Args) {
$PATH_TO_FILE = $file;
Write-Host "Uploading... ($PATH_TO_FILE)";
@No3371
No3371 / VirusTotalUpload.ps1
Created November 9, 2023 04:33
VirusTotalUpload.ps1
$API_KEY = 'YOUR API KEY';
$PATH_TO_FILE = '@BepInEx/plugins/ThatsLit-Release.dll';
$json = curl.exe --request POST `
--header 'accept: application/json' `
--header 'content-type: multipart/form-data' `
--header "x-apikey: ${API_KEY}" `
--form "file=${PATH_TO_FILE}" `
'https://www.virustotal.com/api/v3/files';
$j = $json | ConvertFrom-Json;
@No3371
No3371 / mod.ts
Last active August 13, 2023 09:54
mod.ts
import https from "https";
import { DependencyContainer } from "tsyringe";
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
import { RagfairServer } from "@spt-aki/servers/RagfairServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor";
import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor";
import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService";
import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService";
---- Minecraft Crash Report ----
// Surprise! Haha. Well, this is awkward.
Time: 2023-05-03 14:42:46
Description: Exception ticking world
java.lang.RuntimeException: Mixin transformation of net.minecraft.class_2658 failed
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.getPostMixinClassByteArray(KnotClassDelegate.java:427)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.tryLoadClass(KnotClassDelegate.java:323)
at net.fabricmc.loader.impl.launch.knot.KnotClassDelegate.loadClass(KnotClassDelegate.java:218)
@No3371
No3371 / gist:b60e16a82406eb0979b16dee8261d4de
Created October 26, 2022 05:38
Firefox userChrome stable
#TabsToolbar.browser-toolbar {
display: inline-block !important;
position: absolute;
top: -22px !important;
right: 10px;
}
.tabbrowser-tab {
display: none !important;
}
@No3371
No3371 / gist:cc6737f7333231867b463dd88b4891e7
Created October 26, 2022 05:37
Firefox userChrome.css OneLine
/*Basic Settings*/
:root {
--navbarWidth : 90vw; /* Set width of navbar. Use px for a fixed width
or vw for a percentage of your window. */
--animationSpeed : 0.5s;
}
@No3371
No3371 / deploy_serverconfig.bat
Created February 13, 2022 20:50
For Minecraft server developer. With this we can keep a serverconfig folder in server folder instead of inside world folder. No more accidental deletion and save those server config live reload due to editor auto save..
MKDIR ..\world\serverconfig
DEL ..\world\serverconfig\*.toml
XCOPY ..\serverconfig\*.toml ..\world\serverconfig\
PAUSE
@No3371
No3371 / FirestoreBenchmark.cs
Last active February 9, 2022 10:58
`Google.Cloud.Firestore` and `CommandLineParser` are used. Note: Could be charged for the usage.
using System.ComponentModel;
using System.Diagnostics;
using CommandLine;
using Google.Cloud.Firestore;
using Google.Cloud.Firestore.V1;
Console.WriteLine("Hello, World!");
Console.WriteLine("Available operations:\n- write100\n- write1000\n- write10000\n- query100\n- query1000\n- query10000\n- queryAll\n- count");
@No3371
No3371 / UIReorderer.cs
Created January 22, 2022 10:17
Reorder GameObjects to enable batching for UGUI.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class UIReorderer : MonoBehaviour
{
[Tooltip("The gameobjects get reordered accoring to this. Disable this cause no side effect.")]
public GameObject[] order;
[Tooltip("These are always lower then order[].")]