Skip to content

Instantly share code, notes, and snippets.

@neilsong
neilsong / client.ts
Last active November 3, 2025 23:46
Tanstack Query + Hono RPC
import type { Client } from "@server/hc";
import { hc } from "hono/client";
export const hcWithType = (...args: Parameters<typeof hc>): Client =>
hc(...args) as unknown as Client;
export const client = hcWithType(import.meta.env.VITE_API_URL, {
init: {
credentials: "include",
},

Robosuite Human Demonstrations (Active Learning)

This is a guide to using robosuite for human demonstrations, specifically for active learning purposes.

Environment Creation

We would like to create a robosuite environment interfaced through robomimic wrappers to interop between robosuite's human demonstration interface and robomimic's general environment interface for TensorDicts.

  1. Recall that we must have the ability to boostrap from pretrained models, thus we will use the provided checkpoint to load the environment. The render arg must be set to True.
@neilsong
neilsong / README.md
Last active September 12, 2023 19:37
VSCode Integrated C Build + Debug (with Makefile)

Goal

Build and debug a Make project in VSCode's integrated debugger with the press of a single button.

Procedure

  1. Create folder .vscode.
  2. Create files launch.json and tasks.json as defined in this gist.
  3. Make sure your Makefile is properly configured (change build targets by changing "command" in tasks.json).
  4. Replace [EXECUTABLE_NAME] in launch.json with your output executable.
  5. Define any executable arguments inside args.
  6. Press F5 to begin building and debugging.
@neilsong
neilsong / README.md
Last active February 5, 2024 17:04
GPG Commit Signing for Yale Zoo

Assumptions

  1. You have read this gist prior.
  2. You have already set up a valid GPG key in your Zoo instance and have added it to your GitHub account and to your git config.
  3. You want the green verified ✅ badge next to your commits.
Screenshot 2023-09-03 at 2 20 08 PM

Solution

  • Add the following to your shell config file if you are using bash or zsh:
@neilsong
neilsong / README.md
Last active February 5, 2024 17:03
Git Commit Author and Committer on the Yale Zoo

Problem

You have committed changes to a GitHub repo from the Yale Zoo, and you notice that on GitHub (or with git log) that the commit's author and committer is:

[LAST] [FIRST] <[NETID]@zoo.cs.yale.edu>
Screenshot 2023-09-03 at 1 44 09 PM

instead of the desired

[FIRST] [LAST] <[GITHUB_VERIFIED_EMAIL]>