ssh-keygen -t ed25519 -C "khairul169"
cat .ssh/id_ed25519.pubssh root@hostname| import { MergeableContent, MergeableStore } from "tinybase"; | |
| import { Database } from "bun:sqlite"; | |
| import { createCustomPersister, Persists } from "tinybase/persisters"; | |
| const TABLES = "_tables"; | |
| const escapeId = (str: string) => `${str.replace(/"/g, '""')}`; | |
| const dbSchema = ` | |
| PRAGMA foreign_keys = ON; |
| #!/bin/sh | |
| # /root/.sshtunnel.sh | |
| autossh -M 0 root@hostname -R 8023:localhost:22 -N -o "StrictHostKeyChecking no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -o "ExitOnForwardFailure yes" |
| import React from "react"; | |
| import { useStore } from "zustand"; | |
| import { useFetch, useMutate } from "./useFetch"; | |
| import { authStore, logout } from "./authStore"; | |
| const App = () => { | |
| const { accessToken } = useStore(authStore); | |
| const login = useMutate("/login", { | |
| onSuccess: (data) => { |
| const glslify = require('glslify'); | |
| const path = require('path'); | |
| // This is the original source, we will copy + paste it for our own GLSL | |
| // const vertexShader = THREE.ShaderChunk.meshphysical_vert; | |
| // const fragmentShader = THREE.ShaderChunk.meshphysical_frag; | |
| // Our custom shaders | |
| const fragmentShader = glslify(path.resolve(__dirname, 'standard.frag')); | |
| const vertexShader = glslify(path.resolve(__dirname, 'standard.vert')); |
| /* | |
| * p2p.c | |
| */ | |
| #include <stdarg.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <enet/enet.h> |
| shader_type spatial; | |
| render_mode shadows_disabled; | |
| uniform float rim = 0.25; | |
| uniform float rim_tint = 0.5; | |
| uniform sampler2D albedo : hint_albedo; | |
| uniform float specular; | |
| uniform float roughness = 1.0; | |
| uniform bool disable_lighting = false; | |
| uniform vec4 shadow_color : hint_color; |
| #!/bin/bash | |
| PREVIEW_DIR="preview"; | |
| ENCODED_DIR="encoded"; | |
| PREVIEW_SCALE="-2:240"; | |
| mkdir -p "$PREVIEW_DIR"; | |
| mkdir -p "$ENCODED_DIR"; | |
| # Check arguments |