Skip to content

Instantly share code, notes, and snippets.

View vvuk's full-sized avatar

Vladimir Vukicevic vvuk

  • Unity Technologies
  • San Francisco, CA
  • X @vvuk
View GitHub Profile

The Apollo Domain Protocol is a networking protocol used by the Apollo computer system developed by Apollo Computer Inc. in the 1980s. It is a proprietary protocol that was used primarily for interconnecting Apollo workstations and servers in a local area network.

The Apollo Domain Protocol uses Ethernet as the physical layer and adds a new protocol type (0x8019) to the Ethernet frame. The protocol provides reliable, connection-oriented communication between endpoints using a sequence numbering scheme and acknowledgements.

The source and destination node addresses are encoded in the Apollo Domain Protocol header, which immediately follows the Ethernet header in a packet. The header has the following format:

typedef struct {
    uint16_t count;
 uint16_t type;
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <stropts.h>
#include <sgimc.h>
@vvuk
vvuk / uart.v
Created December 11, 2022 06:25
uart.v
reg [3:0] rxState = 0;
reg [12:0] rxDelay = 0;
reg [2:0] rxBitIndex = 0;
reg [7:0] dataIn = 0;
reg byteReady = 0;
localparam RX_STATE_IDLE = 0;
localparam RX_STATE_START_BIT = 1;
localparam RX_STATE_READ = 2;
localparam RX_STATE_STOP_BIT = 3;
@vvuk
vvuk / CleanUpStaleLinks.ps1
Created May 3, 2021 04:41
Clean up stale start menu links, such as after Windows Recovery
From 3383b4a472f0bd16a8161fb8760cd3e6333f1782 Mon Sep 17 00:00:00 2001
From: David Yip <yipdw@member.fsf.org>
Date: Sun, 8 May 2016 20:24:35 -0500
Subject: [PATCH] A workaround for lingering GCC 5.3 errors.
See also:
* https://github.com/nothings/stb/issues/280
* https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1568899
---
@vvuk
vvuk / make-vs2017-env.bat
Created May 24, 2018 00:07
Generate "vcvarsall" equivalent for msys2 bash from vcvarsall
@ECHO OFF
set OLDPATH=%PATH%
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64 > NUL:
echo export INCLUDE='%INCLUDE%'
echo export LIB='%LIB%'
echo export LIBPATH='%LIBPATH%'
#include <memory>
#include <emscripten.h>
#include <emscripten/bind.h>
class Base
{
public:
Base() {}
void Poke() {}
using System;
using System.Collections.Generic;
using System.Linq;
using V8.Net;
namespace Test1
{
class GlobalUtils
{
public static void WriteLine(string s)
@vvuk
vvuk / foo.ts
Last active January 31, 2017 21:25
// == one.ts ==
export interface SomethingPublic {
foo(a: number): number;
}
// == two.ts ==
// error: SomethingPublic is not visible here
// this doesn't help:
@vvuk
vvuk / headless-fix.patch
Created January 29, 2017 04:25
fix for headless kodi crash
diff --git a/xbmc/GUIInfoManager.cpp b/xbmc/GUIInfoManager.cpp
index c8bcd30..5cebc87 100644
--- a/xbmc/GUIInfoManager.cpp
+++ b/xbmc/GUIInfoManager.cpp
@@ -1241,6 +1241,8 @@ int CGUIInfoManager::TranslateSingleString(const std::string &strCondition, bool
}
else if (cat.name == "skin")
{
+ if (g_application.IsHeadless())
+ return 0;