Skip to content

Instantly share code, notes, and snippets.

View live-wire's full-sized avatar

Dhruv Batheja live-wire

View GitHub Profile
@live-wire
live-wire / bevy-to-wasm.md
Last active October 4, 2022 17:24
Compiling Bevy game to WASM on x86-intel Mac

Instructions


  • rustup target install wasm32-unknown-unknown

  • cargo install wasm-server-runner

  • cargo install wasm-bindgen-cli

  • Add this to your Cargo.toml

[target.wasm32-unknown-unknown]
@live-wire
live-wire / nfs.md
Created October 13, 2022 00:03
NFS Server in Ubuntu 22.04.1 LTS and NFS mounting client in macOS-monterey x86

NFS Server


  • Create NFS Server as shown here
    • Just step 1. is enough.
    • For k8s pvc provisioning, follow all steps including csi-driver & storage-class.
  • Now if your server is all set up, we should be able to mount it from any device in the LAN. (Based on the subnet you whitelisted in the step above)
  • MacOS commands:
    • showmount -e <ip-address-of-nfs-server> will show the shared <mount-path>
  • sudo mkdir -p /private/nfs
@live-wire
live-wire / 20.py
Created December 20, 2022 13:22
Advent of code 2022 - Day 20 solution
class Node:
def __init__(self, value):
self.value = value
self.next = None
self.prev = None
def __str__(self):
return f'[{str(self.value)}]'
def __repr__(self):
@live-wire
live-wire / 21.py
Created December 21, 2022 07:35
Advent of code 2022 - Day 21 solution - Python3
# time python 21.py
# python 21.py 0.48s user 0.12s system 79% cpu 0.748 total
#
#
import re
from collections import defaultdict
from sympy import solve
INPUT = '21.input'
memonkey = 'humn'
@live-wire
live-wire / DEMO_HISTORY_SERVER_FORK.md
Created May 3, 2023 08:42
History server fork demo

Flink History Server (fork)


Current


  • The History server just needs the job-archive (GCS Bucket) location to start.
flowchart TD
 subgraph HistoryServer