Skip to content

Instantly share code, notes, and snippets.

View craftyc0der's full-sized avatar

Joshua Oster-Morris craftyc0der

View GitHub Profile
@craftyc0der
craftyc0der / README.md
Last active December 2, 2022 18:36
SurrealDB and Graph Search

SurrealDB and Graph Search

SurrealDB is a sexy new database server. It has a SQL-style query language, real-time queries with highly-efficient related data retrieval, advanced security permissions for multi-tenant access, and support for performant analytical workloads. SurrealDB is aiming to be a DBaaS and already supports many languages and protocols, something like Firebase plus many more features and capabilities. I've been wanting a tool like this for a log time now. I'm ready to dig in!

Today, I want to look at the graph search capabilities.

Setup

Let's start the server in a container.

@craftyc0der
craftyc0der / AREADME.md
Last active July 30, 2023 03:48
Firebase & Yew

Firebase & Yew

Motivation

I often use Firebase to store data for small projects. I've been using wasm-bindgen to build web tools for a while now (both in production and for personal use). Until now, I have not tried Yew to build a web app. If Yew works well with Firebase, I thought I might give it a shot for the next single page app (SPA) I build.

Goals

  • Create basic Yew page
  • Add Firebase JS SDK
@craftyc0der
craftyc0der / README.md
Last active April 22, 2024 18:31
Setup Snapper on Fedora 34

How to setup RAID1 with BTRFS on Fedora

Here we list our disks for future use.

sudo lsblk
@craftyc0der
craftyc0der / README.md
Last active September 19, 2021 14:50
Simple Reverse Proxy w/ NGINX

Setup Simple Reverse Proxy w/ NGINX

This example assumes you have Minikube installed with a docker repo server on it hosted at port 5000. See this gist for more details on that.

This example will launch a pod with 3 containers that will send the request to the correct container based on the path.

There are many files so open this gist up for all the information.

./run.sh
@craftyc0der
craftyc0der / README.md
Last active November 11, 2022 03:10
Minikube/Ambassador/Agones

Minikube - Agones

Install Ambassador

helm repo add datawire https://app.getambassador.io
helm repo update

helm install -n emissary --create-namespace \
    emissary-ingress --devel \
@craftyc0der
craftyc0der / README.md
Last active August 21, 2021 15:47
Kubernetes Controller Demo

Kubernetes Controller Demo

The purpose of this gist is to share an example of how you can watch the pod lifecycle from within (or outside of) a kubernetes cluster. This allows me to launch a Service whenever a pod is created and delete the service whenever the pod is deleted.

My specific use case is creating an Ambassador Emissary Ingress Service in response to the creation of an Agones GameServer. I have need to host web games that benefit from using edge load balancers that off load

@craftyc0der
craftyc0der / A_POWERSET_GENERATOR.md
Last active April 14, 2021 13:30
Powerset generator in Rust for Twitter Math
$ target/debug/powerset
powerset:
 Input: [1, 2, 3, 4, 5]
 Output: ["", "1", "2", "12", "3", "13", "23", "123", "4", "14", "24", "124", "34", "134", "234", "1234", "5", "15", "25", "125", "35", "135", "235", "1235", "45", "145", "245", "1245", "345", "1345", "2345", "12345"] 
 Has odd count of 16
@craftyc0der
craftyc0der / RBAC-K8S-README.md
Last active November 28, 2020 22:25
Helm v3 Security

RBAC Helm Security for Kubernetes

It is critical to note that Helm v3 is required for a secure helm environment.

Helm v2 used Tiller to facilitate installation of charts and this had its own security.

Helm v3 uses RBAC security to do this.

https://helm.sh/docs/faq/

@craftyc0der
craftyc0der / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../paper-toggle-button/paper-toggle-button.html">
<link rel="import" href="../paper-slider/paper-slider.html">
<link rel="import" href="../paper-button/paper-button.html">