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
;; remove sovol macros:
;; START_PRINT
;; END_PRINT
;; CLEAN_NOZZLE
;; BED_MESH_CALIBRATE
;; comment out if you _do_ have a Stealthburner (and have the STATUS_X macros)
[include "sb-dummy.cfg"]
[gcode_macro START_PRINT]

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: