Skip to content

Instantly share code, notes, and snippets.

View Ugbot's full-sized avatar
🏠
Working from home

Ben Gamble Ugbot

🏠
Working from home
View GitHub Profile
@Ugbot
Ugbot / uv_read_file.c
Created May 23, 2024 17:10 — forked from inlife/uv_read_file.c
Sample for reading a file asynchronously using libuv
// Sample for reading a file asynchronously using libuv
// taken from https://www.snip2code.com/Snippet/247423/Sample-for-reading-a-file-asynchronously
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <uv.h>
static uv_fs_t openReq;
static uv_fs_t readReq;
@Ugbot
Ugbot / wfc.hpp
Created August 14, 2023 14:50 — forked from jdah/wfc.hpp
Wave Function Collapse
#pragma once
#include "util/types.hpp"
#include "util/std.hpp"
#include "util/ndarray.hpp"
#include "util/collections.hpp"
#include "util/rand.hpp"
#include "util/hash.hpp"
#include "util/assert.hpp"
#include "util/bitset.hpp"
{
"info": {
"_postman_id": "07c117b0-7200-41b9-94fc-5836a6b08d7b",
"name": "Kafka Rest Proxy API",
"description": "Adapted from https://docs.confluent.io/current/kafka-rest/api.html",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "v2",
/*
* 3D Geohash modified from https://github.com/kungfoo/geohash-java/blob/master/src/main/java/ch/hsr/geohash/GeoHash.java
* Paul Brebner, Instaclustr.com
* 5 June 2019
* Just a demonstration of how altitude can be used to encode a 3D geohash, for use with Anomalia Machina blog series.
*/
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
@Ugbot
Ugbot / UE4-build.bat
Created December 23, 2021 08:51 — forked from drewsberry/UE4-build.bat
UE4 Windows command line building
:: Build client
RunUAT BuildCookRun -project="full_path.uproject"^
-noP4 -platform=Win64^
-clientconfig=Development -serverconfig=Development^
-cook -allmaps -build -stage^
-pak -archive -archivedirectory="Output Directory"
:: Cook client
RunUAT BuildCookRun -project="full_project_path_and_project_name".uproject^
-noP4 -platform=Win64^
@Ugbot
Ugbot / LICENSE.txt
Created February 22, 2021 17:50 — forked from atanumallick/LICENSE.txt
D3 Rotating Globe with Location Marker
MIT License
Copyright (c) 2018-2022 Atanu Mallick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@Ugbot
Ugbot / simd-vmv.c
Created May 31, 2020 10:18 — forked from kbarbary/simd-vmv.c
Vector-matrix-vector multiplication with SIMD (AVX) intrinsics
// Doing the operation:
//
// | a a a a | | y |
// x * A * y = [ x x x x ] | a a a a | | y |
// | a a a a | | y |
// | a a a a | | y |
//
// with SIMD intrinics (specifically AVX).
//
// adapted from https://gist.github.com/rygorous/4172889