Skip to content

Instantly share code, notes, and snippets.

View retrogeek46's full-sized avatar
🕹️
Playing games

Retro retrogeek46

🕹️
Playing games
View GitHub Profile

Privacy Policy

AfroGeek built the Caught In The Web app as a Free app. This SERVICE is provided by AfroGeek at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which are accessible at Caught In The Web unless otherwise defined in this Privacy Policy.

/* Copyright 2021 Retrogeek46
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@retrogeek46
retrogeek46 / Program.cs
Created June 8, 2022 08:17
Simple C# script to get currently active window name and sent to it to a REST Api endpoint
using System;
using System.Text;
using System.Runtime.InteropServices;
using System.Text.Json;
using System.Text.Json.Serialization;
using System.Net.Http;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace ActiveWinTest {
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetTitleMatchMode, 2 ; This let's any window that partially matches the given name get activated
; Alt Tab with LK67 knob
LAlt & Pause::AltTab
LAlt & ScrollLock::ShiftAltTab
@retrogeek46
retrogeek46 / Utils.cs
Created March 16, 2020 17:45
Utility script for json helper classes and texture extensions
using System;
using System.Collections;
using System.Collections.Generic;
using System.Threading;
using UnityEngine;
// This code sample has been taken from http://answers.unity.com/answers/1292514/view.html
/// <summary>
/// This class extends the inbuilt Texture class
/// </summary>
@retrogeek46
retrogeek46 / NetworkManager.cs
Created March 16, 2020 17:44
UI and Image Support
using System;
using System.Collections;
using System.Reflection;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;
/// <summary>
/// This class handles all the network requests and serialization/deserialization of data
/// </summary>
@retrogeek46
retrogeek46 / BotUI.cs
Last active June 18, 2021 12:12
BotUI script for rendering messasges
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
/// <summary>
/// This class contains the gameobjects and methods for interacting with the UI.
/// </summary>
public class BotUI : MonoBehaviour {
public GameObject contentDisplayObject; // Text gameobject where all the conversation is shown
@retrogeek46
retrogeek46 / NetworkManager.cs
Last active April 12, 2021 06:44
Json Parsing chatbot response
using System;
using System.Collections;
using System.Reflection;
using UnityEngine;
using UnityEngine.Networking;
// A class to help in creating the Json object to be sent to the rasa server
public class PostMessageJson {
public string message;
public string sender;
@retrogeek46
retrogeek46 / NetworkManager.cs
Last active February 26, 2020 07:17
Network Manager for connecting a to a rasa server using a custom connector
using System.Collections;
using UnityEngine;
using UnityEngine.Networking;
// A struct to help in creating the Json object to be sent to the rasa server
public class PostMessageJson {
public string message;
public string sender;
}