Skip to content

Instantly share code, notes, and snippets.

View ttvd's full-sized avatar
:shipit:

Mykola Konyk ttvd

:shipit:
View GitHub Profile

A metatable can be defined like

local t = setmetatable({}, {
  __tostring = function() return 'custom tostring behavior!' end
})

Here are the metamethods that you can define, and their behavior

Operators

@ixs
ixs / intel_x520_patcher.py
Last active May 23, 2024 23:13
Intel x520 EEPROM Patcher allows to unlock the x520 network card to work with non-intel branded SFP modules.
#!/usr/bin/env python3
#
# Simple Intel x520 EEPROM patcher
# Modifies the EEPROM to unlock the card for non-intel branded SFP modules.
#
# Copyright 2020,2021,2022 Andreas Thienemann <andreas@bawue.net>
#
# Licensed under the GPLv3
#
# Based on research described at https://forums.servethehome.com/index.php?threads/patching-intel-x520-eeprom-to-unlock-all-sfp-transceivers.24634/
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active May 17, 2024 05:02
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@mmozeiko
mmozeiko / xbox_test.c
Last active February 27, 2024 17:41
Getting xbox controller input without xinput
// cl.exe xbox_test.c /link setupapi.lib user32.lib
#include <windows.h>
#include <setupapi.h>
#include <dbt.h>
#include <stdio.h>
/// interface
#define XBOX_MAX_CONTROLLERS 16
@d7samurai
d7samurai / .readme.md
Last active May 20, 2024 15:08
Minimal D3D11

Minimal D3D11

Minimal D3D11 reference implementation: An uncluttered Direct3D 11 setup + basic rendering primer and API familiarizer. Complete, runnable Windows application contained in a single function and laid out in a linear, step-by-step fashion that should be easy to follow from the code alone. ~200 LOC. No modern C++, OOP or (other) obscuring cruft. View on YouTube

hollowcube

Also check out Minimal D3D11 pt2, reconfigured for instanced rendering and with a smaller, tighter, simplified overall code structure, or Minimal D3D11 pt3, with shadowmapping + showcasing a range of alternative setup and rendering techniques.

@pjobson
pjobson / plex_media_permissions_4_noobies.md
Last active April 21, 2024 21:37
Plex Media Permissions for Linux Noobies

Plex Media Permissions for Linux Noobies

There is no problem with being a noobie and I do not use the term to sligtht or disparage anyone.

This is a way to setup your permissions for running Plex in Linux. Different folks may use different methods.

The permissions concepts provided here apply to OSX, but the users and groups are controlled and modified differently, so much of this will not work properly. I think the command is dscl, but that could be out of date.

There are many ways to setup your permissions scheme in Linux, this methodology describes a way to do it, not everyone will like it, but it works for me, so whatever.

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

@norlin
norlin / UE5-Project.sublime-build
Last active December 7, 2022 19:26
Build system for Unreal Engine projects for Sublime Text
{
"cmd": [
// Default path for UE 5
"C:/Program Files/Epic Games/UE_5.0/Engine/Build/BatchFiles/Build.bat",
// Build configuration is set to "Development" by default
"Development",
// The platform is set to Win64 by default
"Win64",
"-Project",
// The Sublime project name must match the Unreal project filename
@nessus42
nessus42 / destiny-networking.md
Last active May 21, 2024 12:39
How Networking Works in Destiny 1 and How It Will Differ in Destiny 2 (According to Bungie)

(NOTE: This is the original version of my Reddit post. Since I have made a major revision to the post in order to clarify issues that were left somewhat unclear in the original version, and to address some complaints about minor factual errors, I am preserving the original here just so that no one thinks that I'm trying to pull the wool over anyone's eyes. The updated version is available here. It can probably be left unsaid that this parenthetical comment was not in the original post, but I've learned the hard way that unless you spell everything out in explicit detail and accuracy, someone or another will post a complaint.)

TLDR: In Destiny 1, there are three types of servers: mission servers, zone servers, and physics servers. The first two run in Bungie's server cloud, but the physics server runs on a player's console. The physics server runs on a console in order to save mone