Skip to content

Instantly share code, notes, and snippets.

View KairuDeibisu's full-sized avatar
😁
I'm happy employeed!

Kyle Davis KairuDeibisu

😁
I'm happy employeed!
View GitHub Profile
@KairuDeibisu
KairuDeibisu / App.tsx
Created November 30, 2023 19:06
Proof of concept hook API for Excalidraw
import React, { useEffect, useState } from 'react';
import { Excalidraw } from "@excalidraw/excalidraw";
import type { ExcalidrawImperativeAPI } from '@excalidraw/excalidraw/types/types';
import Example from './Example';
import { ExcalidrawAPIProvider } from './hooks/useExcalidrawAPI';
function App() {
const [excalidrawAPI, setExcalidrawAPI] = useState<ExcalidrawImperativeAPI | null>(null);
return (
@KairuDeibisu
KairuDeibisu / .bashrc
Last active June 12, 2023 16:24
Forward SSH from WSL 2
# Configure ssh forwarding
export SSH_AUTH_SOCK=$HOME/.ssh/agent.sock
# Use pgrep to check if the process is running
pgrep -f "npiperelay -ei -s //./pipe/openssh-ssh-agent" > /dev/null
IS_ALREADY_RUNNING=$?
if [[ $IS_ALREADY_RUNNING -ne 0 ]]; then
if [[ -S $SSH_AUTH_SOCK ]]; then
# Not expecting the socket to exist as the forwarding command isn't running