Skip to content

Instantly share code, notes, and snippets.

@galister
galister / startvr
Last active June 23, 2024 11:47
SteamVR-on-Linux Start Script
#!/usr/bin/env bash
steamapps="$HOME/.steam/steam/steamapps"
# == end config ==
steam_dir=$(dirname $steamapps)
if ! grep 'alvr_server' $steamapps/common/SteamVR/resources/safe_mode_driver_whitelist.json >/dev/null 2>&1; then
cat $steamapps/common/SteamVR/resources/safe_mode_driver_whitelist.json |
jq '.drivers |= (. + ["alvr_server"] | unique)' |
@JakeWharton
JakeWharton / AutoGson.java
Last active November 28, 2021 12:32
A Gson TypeAdapterFactory which allows serialization of @autovalue types. Apache 2 licensed.
import com.google.auto.value.AutoValue;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.TYPE;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
/**
* Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization.
* <p>
@staltz
staltz / introrx.md
Last active July 27, 2024 04:59
The introduction to Reactive Programming you've been missing
@nolanlawson
nolanlawson / completion-for-gradle.md
Last active April 5, 2024 07:43
Gradle tab completion for Bash. Works on both Mac and Linux.

Gradle tab completion script for Bash

A tab completion script that works for Bash. Relies on the BSD md5 command on Mac and md5sum on Linux, so as long as you have one of those two commands, this should work.

Usage

$ gradle [TAB]