Skip to content

Instantly share code, notes, and snippets.

View WeaponsTheyFear's full-sized avatar

Jonathan WeaponsTheyFear

View GitHub Profile
<?php declare(strict_types = 1);
namespace Runt\Database;
/**
* A database PDO wrapper that provides a
* fluent api for fast, easy database operations.
* This is based off the now defunct Kohana Framework
* database and ORM.
*
@WeaponsTheyFear
WeaponsTheyFear / gist:6d6a43cd39eee7010fc5c5a8393e5117
Created July 10, 2023 01:01
Godot, very simple tcp connection to python tcp server
class_name Core
extends Node
# What region will we be connecting to?
var region: String = "US"
# Dictionary of server regions containing their matching ip/port
var _server_dict: Dictionary = {
"Local": ["127.0.0.1", 6060],
@WeaponsTheyFear
WeaponsTheyFear / gist:60d5a5ef8bf8e77892f35976a7b87b04
Created July 10, 2023 01:04
Python tcp server using twisted framework, multiclient for Godot project
import time
import datetime
import logging
from twisted.internet import reactor
from twisted.internet.protocol import ServerFactory, Protocol
# Defines the time between server reports
SERVERSTATCALLBACK = 3600
# Client class handler