Skip to content

Instantly share code, notes, and snippets.

View louisgv's full-sized avatar
🔀
Co-founder, OpenRouter

L louisgv

🔀
Co-founder, OpenRouter
View GitHub Profile
@louisgv
louisgv / ori-slack-dark.svg
Last active March 21, 2026 06:44
Ori (OpenRouter's Intern) — Slack thread badge for GitHub PRs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@louisgv
louisgv / mosh-setup-guide.md
Created March 14, 2026 18:28 — forked from marcwjj/mosh-setup-guide.md
Step by step guide to setup mosh ssh client to Google Cloud VM instance

A beginner's guide to setup Mosh roaming terminal on Mac to access Google Cloud Compute Engine instance

Being new to training ML models using Google Cloud VM instances, I faced issues where my ssh connection to the cloud instance (using either the clound web-based ssh client or using cloud shell) would disconnect from time to time (for example when I power off my laptop or the network gets disconnected) which would terminate the model training process. Therefore I searched for a ssh client that can handle disconnection and can resume connection without disrupting the process running on the server and came across with Mosh mobile shell, a remote terminal app that supports roaming.

It took me a while to figure out how to set up a third party ssh terminal using the google cloud OAuth. Here's a step-by-step guide:

Update: a simpler alternative for persisting remote sessions

Since this writing, another Mosh user kindly advised me that using terminal multiplexer co

@louisgv
louisgv / mic-recorder.ts
Last active March 7, 2024 12:16
AudioWorklet replacement for ScriptProcessorNode
const main = async () => {
const context = new AudioContext();
const microphone = await navigator.mediaDevices
.getUserMedia({
audio: true
})
const source = context.createMediaStreamSource(microphone);
void setup() {
Serial.begin(9600);
pinMode(7, OUTPUT);
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
if (Serial.available() > 0) {
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/GameModeBase.h"
#include "Engine/DataTable.h"
#include "SharedStruct.generated.h"
template<class FEnumKey, class BEnumKey, class V3EnumKey, class V2EnumKey>
@louisgv
louisgv / TestVectorField.fga
Last active January 6, 2019 09:59
UE4-vectorfield-niagara-1-6-19
8,8,8,
-400.000000,-400.000000,-400.000000,
400.000000,400.000000,400.000000,
-44.599739,-73.054445,51.709890,
-78.932536,57.900941,-20.423894,
85.325754,-23.324916,-46.641880,
-17.385216,-63.589990,-75.193536,
-26.651666,-50.372010,82.172680,
-30.384400,86.577320,-39.763755,
79.160744,-28.201401,-54.205716,
@louisgv
louisgv / gist:78e89ef0d43c6292d645062374bb6fcf
Created March 6, 2018 03:08
Static Word Cloud Generator
const rawListWords = `Simple
Artistic
Clean
Flat
Solid
Aesthetic
Functional
Elegant
Professional
Helvetica
@louisgv
louisgv / ListBenchmark.kt
Last active August 15, 2017 22:04
Benchmarking several way of traversing list in Kotlin
/**
* Created by L on 8/15/17.
*/
import java.util.*
/**
* Iterates provided by [callback] code [ITERATIONS]x[TEST_COUNT] times.
* Performs warming by iterating [ITERATIONS]x[WARM_COUNT] times.
### Keybase proof
I hereby claim:
* I am louisgv on github.
* I am louisgv (https://keybase.io/louisgv) on keybase.
* I have a public key ASBsRFh_QdrEBNdpw2llUbTuZGNOkvH4r-JU0175FqLbFwo
To claim this, I am signing this object:
@louisgv
louisgv / BatchBurner.cs
Created December 23, 2016 09:20 — forked from luciditee/BatchBurner.cs
Batch Burner, a script designed to reduce static mesh draw calls in Unity scenes with a large number of static mesh entities.
/*
* Unity Batch Burner: A script designed to reduce static mesh draw calls automatically in scenes
* with a large amount of static geometry entities.
*
* Copyright 2016-2017 Will Preston & Die-Cast Magic Studios, LLC.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*