Looking for some code snippets? They're now here.
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
import json | |
import os | |
with open("<json path>") as file: | |
secrets = json.load(file) | |
appsInstalled = ( | |
os.popen(f"steamcmd +login {secrets['login']['username']} +apps_installed +quit") | |
.read() | |
.split("\n") |
Initial networking prototype is functional! Here's a work-in-progress video, with an explanation in the description below.
User coordinates printed to console via first Lua script ➡ VConsole2 runs with logging enabled (HL:A launch option -condebug) ➡ Java program scrapes coords from log, and writes a second Lua script containing these coords ➡ Second Lua script moves the red ball to coords.
The Java program sends those coordinates to itself over a network. This networking setup draws from a configuration file that designates server and client TCP/UDP ports, as well as client IP, client timeout (in ms), and HL:A log path.
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
# /u/User123 -> /video-channels/User123/videos (using 302) | |
# /user/User123 -> same as above | |
# supports optional trailing slash | |
# returns pace rip 404 page if something more than /u/user-name, like /u/user-name/hazardous/text | |
rewrite ^/(?:u|user)/([^/]+)/?$ /video-channels/$1/videos redirect; |