Skip to content

Instantly share code, notes, and snippets.

View raychorn's full-sized avatar

Ray C Horn raychorn

View GitHub Profile
@raychorn
raychorn / PlayerAnimator.cs
Created October 17, 2022 23:26 — forked from Matthew-J-Spencer/PlayerAnimator.cs
Control unity animations using code. Video: https://youtu.be/ZwLekxsSY3Y
using System;
using UnityEngine;
using UnityEngine.Tilemaps;
using Random = UnityEngine.Random;
public class PlayerAnimator : MonoBehaviour {
[SerializeField] private float _minImpactForce = 20;
// Anim times can be gathered from the state itself, but
// for the simplicity of the video...
@raychorn
raychorn / decode.py
Created July 31, 2022 16:28 — forked from Chase-san/decode.py
A python script to decode the hello games no man's sky save files. (The newer compressed kind)
#!/usr/bin/python3
import io
import os
import lz4.block
from glob import glob
FILE_PATH = os.path.dirname(os.path.realpath(__file__))
def uint32(data):
"""Convert 4 bytes to a little endian unsigned integer."""
@raychorn
raychorn / docker-compose.yml
Created December 16, 2021 16:08 — forked from mjul/docker-compose.yml
Elastic Search, Logstash and Kibana via docker-compose for parsing key=value style log files
version: '2'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.2.2
volumes:
- esdata:/usr/share/elasticsearch/data
ports:
- "9200:9200"
@raychorn
raychorn / portainer.md
Created June 23, 2021 18:15 — forked from SeanSobey/portainer.md
Portainer Setup on Windows 10

Portainer on Windows 10

Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.

Using host.docker.internal

This setup will let you run Portainer on windows by using the host.docker.internal endpoint (docker.for.win.localhost is depricated since docker version 3.2.1, but older versions may use this instead).

Please note:

@raychorn
raychorn / Self-Deploying_Microservice_Architecture_for_Python_3.doc
Last active November 18, 2020 19:27
Self Deploying Microservice Architecture for Python 3.x
### Features:
Pluggable via Python Modules via Python Package(s).
Low Amount of code required to deploy and thus self-deploying.
Django Framework + Django Rest Framework.
Plug-in Python Module and either Introspect or use Metadata in the Module to define the specific functions to expose via REST.
Each function becomes a separate and distinct REST Web Service via a Smart APIView subclass that encapsulates the Security Model
package main
import (
"crypto/aes"
"crypto/cipher"
"fmt"
"crypto/rand"
"io"
"encoding/base64"
"encoding/hex"
@raychorn
raychorn / gist:9fbe3c40a79a843e3e789ac047fc4a19
Created October 28, 2020 13:10
Windows 10 Docker Desktop VSCode WSL 2 Ubuntu 20.04 Development Environment
Windows 10 Docker Desktop VSCode WSL 2 Ubuntu 20.04 Development Environment - this kinda says it all, if you are familar with how this might work.
Some development environments might not like Ubuntu 20.04 but they might like Debian Buster better and when this happens it can be useful to
deploy a new development environment via Docker Desktop from WSL 2 Ubuntu 20.04 via the command line and mount the project files from
Linux. One minor rub is to get "git" (no pun) into the Container but this can be easily done when the Docker Image is built.
Works for me.
@raychorn
raychorn / wsl-install_another_distro.md
Created October 17, 2020 19:13 — forked from artman41/wsl-install_another_distro.md
Instructions on how to install a custom distro in WSL2 (Windows SubSystem for Linux 2)

WSL install another distro

  1. Here are some default vars for the process
ISO_DIR=~/fedora;
ROOTFS_MOUNT_DIR=/mnt/contents

DISTRO_LOCATION=
@raychorn
raychorn / GO Dataframes
Last active October 17, 2020 23:02
Data Analysis using GO
https://mungingdata.com/go/dataframes-gota-qframe/
https://github.com/go-gota/gota <-- Minimal.
https://github.com/tobgu/qframe <-- Stable?
https://github.com/rocketlaunchr/dataframe-go <-- Looks interesting.
Probably easier to use Python pandas to load the data then dump data into GO via JSON/Web localhost to crunch the data
possibly faster than using Python alone. Then respond back to Python with data it can load into a Pandas dataframe, etc.
@raychorn
raychorn / Python_Go_Bridge_v1
Created October 17, 2020 14:17
Make Python faster by using GO as efficiently as possible with minimal effort. (with a bit of RUST).
Problem Statement:
Use Go to augment the processing power of Python.
Solutions:
(1) Call GO from Python:
This can be done but it is a bit tedious as shown below: