Skip to content

Instantly share code, notes, and snippets.

View blueben's full-sized avatar

Benjamin Krueger blueben

View GitHub Profile
@JoePotchen
JoePotchen / AudioLowPassTrigger.cs
Last active August 27, 2021 20:53
Udon Audio Low Pass Trigger
//Meant to be thrown on a collider that triggers the effect. Could definitely be made better, rushed it for a project.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
public class AudioLowPassTrigger : UdonSharpBehaviour
{
@danc256
danc256 / chattervox_install_macos.md
Created March 5, 2019 17:12 — forked from brannondorsey/chattervox_install_macos.md
Chattervox Install Instructions

Chattervox on MacOS

Install Direwolf

The official Direwolf User Manual uses MacPorts to manage installation and dependencies. I don't particularly like MacPorts, so here are some instructions for installing Direwolf via Homebrew.

Install Direwolf via Homebrew

@mattupstate
mattupstate / consul-ssh-configurator.py
Last active September 27, 2020 17:56
A script to generate an SSH config from Consul's HTTP API
#!/usr/bin/env python3
"""
Renders a partial SSH configuration file from Nodes and Services
located in a specified Consul catalog and then merges other partial
config files into the main ~/.ssh/config file. The Consul based SSH
config follows a convention for the SSH host::
Host <consul-cluster-name>-<service-name>-<node-address>
User <ssh-user>
Hostname <consul-node-address>
@derekp7
derekp7 / gist:9978986
Last active April 12, 2024 17:46
RPC in Bash (rpcsh)

Let's say you have a Bash shell script, and you need to run a series of operations on another system (such as via ssh). There are a couple of ways to do this.

First, you can stage a child script on the remote system, then call it, passing along appropriate parameters. The problem with this is you will need to manually keep the remote script updated whenever you change it -- could be a bit of a challenge when you have something to execute on a number of remote servers (i.e., you have a backup script running on a central host, and it needs to put remote databases in hot backup mode before backing them up).

Another option is to embed the commands you want to run remotely within the ssh command line. But then you run into issues with escaping special characters, quoting, etc. This is ok if you only have a couple commands to run, but if it is a complex piece of Bash code, it can get a bit unwieldy.

So, to solve this, you can use a technique called rpcsh -- rpc in shell script, as follows:

First, place th

#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active March 27, 2024 06:33
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx