Skip to content

Instantly share code, notes, and snippets.

View mstruebing's full-sized avatar
🚀
phew phew

Max Strübing mstruebing

🚀
phew phew
View GitHub Profile
@mstruebing
mstruebing / machine.js
Created April 28, 2020 07:51
Generated by XState Viz: https://xstate.js.org/viz
const careplanMachine = Machine(
{
id: "careplan",
key: "careplan",
initial: "onboarding",
states: {
onboarding: {
on: {
REDUCE_WEIGHT: "reduce_weight",
SLEEP_ENHANCEMENT: "sleep_enhancement"
@mstruebing
mstruebing / machine.js
Created April 27, 2020 14:39
Generated by XState Viz: https://xstate.js.org/viz
const careplanMachine = Machine(
{
id: "careplan",
key: "careplan",
initial: "onboarding",
states: {
onboarding: {
on: {
REDUCE_WEIGHT: "reduce_weight",
SLEEP_ENHANCEMENT: "sleep_enhancement"
@mstruebing
mstruebing / packagemanager.sh
Created March 18, 2019 07:44
abstraction around package mananger
function package_manager() {
local type="$1"
local command="$2"
local args="$3"
local POSSIBLE_INSTALL_COMMAND=(install add require)
case $type in
'npm' )
if [[ " ${POSSIBLE_INSTALL_COMMAND[*]} " == *" $command "* ]]; then
npm install "$args"
build:
cargo +nightly build --target wasm32-unknown-unknown --release
wasm-gc target/wasm32-unknown-unknown/release/hello_world.wasm -o hello_world.gc.wasm
install:
rustup update
rustup toolchain install nightly
rustup target add wasm32-unknown-unknown --toolchain nightly