Skip to content

Instantly share code, notes, and snippets.

View MattMcNam's full-sized avatar

Matthew McNamara MattMcNam

View GitHub Profile
@MattMcNam
MattMcNam / obs.js
Last active August 29, 2015 14:04
OBS API Draft
nodecg.obs will be an OBSRemote object, defined below
It also has OBSScene and OBSSource objects, which are defined at the bottom.
--------------
/**
* Try to connect to OBS
* Password is optional, NodeCG will check is auth is needed
*
* If connection fails, obs.onConnectionFailed is called
@MattMcNam
MattMcNam / extension -> index.js
Created March 22, 2017 19:00
webpack + nodecg
const express = require('express');
const app = express();
const {NODE_ENV} = process.env;
module.exports = function(nodecg) {
if (NODE_ENV !== 'production') {
const webpack = require('webpack');
const webpackConfig = require('../webpack.dev.config');
const devMiddleware = require('webpack-dev-middleware');
@MattMcNam
MattMcNam / auto.efs
Last active February 26, 2022 00:29
autofs script for AWS EFS IDs - uses amazon-efs-utils helper
#!/bin/bash
# Stripped down and tweaked version of auto.net
# This file must be executable to work! chmod 755!
key="$1"
echo "/" | awk -v key="$key" -v opts="-fstype=efs" -- '
BEGIN { ORS=""; first=1 }
{ if (first) { print opts; first=0 }; print "\\\n\t" $1, key ":" $1 }