Skip to content

Instantly share code, notes, and snippets.

View wgaylord's full-sized avatar

William Gaylord wgaylord

View GitHub Profile
@wgaylord
wgaylord / gist:6806c0b0eb93ea6106e8ddbabda076cb
Created December 30, 2023 21:59
Mineflayer 1.20.2 with PR 3243 and chunk batch fix from its comments.
> mineflayer@4.14.0 mocha_test
> mocha --reporter spec --exit -g 1.20.2
mineflayer_external 1.20.2v
Port chosen: 40165
downloading and starting server
Unpacking 1.20.2/server-1.20.2.jar (versions:1.20.2) to versions/1.20.2/server-1.20.2.jar
@wgaylord
wgaylord / play.c
Last active December 13, 2023 22:49 — forked from blippy/play.c
Playing hard-coded audio on an ESP32 via DAC
#include <stdio.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "driver/gpio.h"
#include "sdkconfig.h"
#include <driver/dac.h>
// The 8-bit values in our sound sample
#include "track.h"
Vanillia
[18:01:53] [Server thread/INFO]: Stopping the server
[18:01:53] [Server thread/INFO]: Stopping server
[18:01:53] [Server thread/INFO]: Saving players
[18:01:53] [Server thread/INFO]: Saving worlds
[18:01:54] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld
[18:02:17] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether
[18:02:17] [Server thread/INFO]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end
[18:02:17] [Server thread/INFO]: ThreadedAnvilChunkStorage (world): All chunks are saved
[18:02:17] [Server thread/INFO]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved
Play - toClient
New Packets
chunk_batch_finished - Marks the end of a chunk batch and
says how many chunks were in the batch
According to wiki.vg this is used with chunk_batch_start
and also chunk_batch_received to estimate the best chunks
per tick to send for your network speed.
@wgaylord
wgaylord / main.cpp
Last active September 15, 2023 15:34
Memory Allocator game.
#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include <ctime>
bool CheckBounds(int mouseX, int mouseY, int top, int left, int width, int height);

Addons I have worked on in some way.

Improvements / Edits

tttdamgelogs


I have made multiple Pull Requests on this addon and also have been working on new functionality.

Improvements

chibill@jwg1:/data_pool/Rust/esp32/rust-metal/rust-metal$ cargo build
Compiling compiler_builtins v0.1.67
Compiling proc-macro2 v1.0.36
Compiling unicode-xid v0.2.2
Compiling syn v1.0.86
Compiling libc v0.2.119
Compiling core v0.0.0 (/home/chibill/.rustup/toolchains/esp/lib/rustlib/src/rust/library/core)
Compiling cfg-if v1.0.0
Compiling libc v0.2.108
Compiling memchr v2.4.1
chibill@jwg1:/data_pool/Rust/esp32/rust-esp32-std-demo$ cargo +esp build
Updating git repository `https://github.com/esp-rs-compat/getrandom.git`
Updating git repository `https://github.com/esp-rs-compat/polling`
Updating git repository `https://github.com/esp-rs-compat/smol`
Updating git repository `https://github.com/esp-rs-compat/socket2`
Updating crates.io index
Updating git repository `https://github.com/yuri91/ili9341-rs`
Downloaded futures-sink v0.3.21
Downloaded futures-channel v0.3.21
Downloaded anyhow v1.0.56
ENDPOINT: POST https://network.satnogs.org/api/jobs/
What it does: Creates a new observation on a station using the provided data.
TEMP Station must be owned by api_token for now unless admin.
form-data:
ground_station
start
end
# Python Prime Sieve
#
# MyFirstPython Program (tm) Dave Plummer 8/9/2018
#
# This is the main prime_sieve class. Call it with the number you wish as an upper limit, then
# call the runSieve method to do the calculation. printResults will dump the count to check validity.
#
# Updated 3/22/2021 for Dave's Garage episode comparing C++, C#, and Python