IF (System.IfProcess.ProcessIsNotRunning ProcessName: $'''launcher''') THEN
System.RunApplication.RunApplicationAndWaitToLoad ApplicationPath: $'''G:\\Star Wars - The Old Republic\\launcher.exe''' WindowStyle: System.ProcessWindowStyle.Normal Timeout: 0 ProcessId=> AppProcessId WindowHandle=> WindowHandle
END
Scripting.RunPowershellScript Script: $'''op item get SWTOR --format json''' ScriptOutput=> PowershellOutput
Variables.ConvertJsonToCustomObject Json: PowershellOutput CustomObject=> Secrets
SET username TO Secrets['fields'][0]['value']
SET password TO Secrets['fields'][1]['value']
SET otp TO Secrets['fields'][6]['totp']
UIAutomation.PopulateTextField TextField: appmask['Pane \'STAR WARS™: The Old Republic™\'']['username'] Text: username Mode: UIAutomation.PopulateTextMode.Replace ClickType: UIAutomation.PopulateMouseClickType.SingleClick
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #load "BenchmarkDotNet" | |
| public void Main() | |
| { | |
| Advanced(); | |
| Basic(); | |
| } | |
| public string FilePath = @"C:\Users\patri\OneDrive\Desktop\AncestryDNA.txt"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| var data = Load(@"C:\Users\patri\OneDrive\Desktop\AncestryDNA.txt"); | |
| data.Dump(); | |
| } | |
| public class GeneticData | |
| { | |
| private ReadOnlyMemory<char> Line { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| Galaxy galaxyNode = new Galaxy() { Name = "The galaxy", NodeType = NodeType.Galaxy }; | |
| foreach(var regionName in Enumerable.Range(0, 5).Select(x => $"Region {x}")) | |
| { | |
| SpaceRegion spaceNode = new SpaceRegion { Name = regionName, NodeType = NodeType.SpaceRegion }; | |
| foreach (var sectorName in Enumerable.Range(0, 3).Select(x => $"Sector : {x}")) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static readonly string Settings = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments, System.Environment.SpecialFolderOption.None), "Star Wars - The Old Republic", "CombatLogs"); | |
| public static DirectoryInfo CombatLogsDirectory => new(Settings); | |
| void Main() | |
| { | |
| foreach (var file in EnumerateCombatLogs()) | |
| { | |
| foreach (var line in EnumerateCombatLogItems(file)) | |
| { | |
| if (line.Value is not null) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| Util.AutoScrollResults = true; | |
| DateTime? lastWriteTime = null; | |
| string? lastFileName = null; | |
| DirectoryInfo combatLogsDirectory = new DirectoryInfo(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments, System.Environment.SpecialFolderOption.None), "Star Wars - The Old Republic", "CombatLogs")); | |
| using(var mre = new ManualResetEvent(false)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Character character = new Character(); | |
| var serializeOptions = new JsonSerializerOptions { WriteIndented = true, Converters = { new JsonStringEnumConverter() } }; | |
| var api = new OpenAIAPI(Util.GetPassword("openapi.apikey")); | |
| var systemMessages = new List<string>() | |
| { | |
| "You only respond in JSON", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $pts = $true | |
| # Path to SWTOR Install | |
| $install = @{ | |
| path = $pts ? ("G:\Star Wars - The Old Republic\publictest\retailclient\swtor.exe") : "G:\Star Wars - The Old Republic\swtor\retailclient\swtor.exe" | |
| workingDirectory = $pts ? ("G:\Star Wars - The Old Republic\publictest\retailclient") : "G:\Star Wars - The Old Republic\swtor\retailclient" | |
| } | |
| Get-Process *swtor* | Stop-Process |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void Main() | |
| { | |
| Model one = new() { Prop1 = null }; | |
| Model two = new() { Prop1 = null }; | |
| one.GetHashCode().Equals(two.GetHashCode()).Dump("hashcode"); | |
| one.Equals(two).Dump("equals"); | |
| } | |
| public class Model | |
| { |