Skip to content

Instantly share code, notes, and snippets.

View rpavlik's full-sized avatar

Rylie Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / boilerplate.ps1
Last active February 25, 2016 22:19
Boilerplate Send-To
# C++ Boilerplate Generator Send-To Scripts
# Maintained at https://gist.github.com/rpavlik/fbdf1347e52b64b833c5
# Main script
#
# Look at that gist for a bootstrapper script that installs or upgrades this script for you.
# Create shortcuts like
# %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -WindowStyle Hidden -NoProfile -ExecutionPolicy Bypass -File C:\Users\Ryan\Dropbox\configs\win-scripts\boilerplate.ps1
# to use this easily - or just use the bootstrapper/installer to make them for you.
@rpavlik
rpavlik / ComputeGenerator.groovy
Last active July 13, 2016 19:21
Compute the CMake generator for Windows (for use in Jenkins, for instance) based on some orthogonal environment variables.
/* ComputeGenerator.groovy by Ryan Pavlik - maintained at https://gist.github.com/rpavlik/3ad0e691e5d51606bd67 */
/* Uncomment the following for testing purposes only */
/*
VS='12'
BIT='64'
*/
/* should give result [GENERATOR:Visual Studio 12 2013 Win64] */
@rpavlik
rpavlik / building-osvr-on-debian-jessie.sh
Last active November 21, 2016 12:24
Building OSVR on debian jessie
# Git - for retrieving source
sudo apt-get install git gitk git-core
# CMake - for configuring the source, ccmake is a command-line "gui" provided by cmake-curses-gui, while cmake-gui is provided by cmake-qt-gui
# Pulls in a lot of basic build deps with it if you don't have them.
sudo apt-get install cmake cmake-curses-gui cmake-qt-gui
# Installs the standard compilers, etc.
sudo apt-get install build-essential
@rpavlik
rpavlik / third-party-related-hiding.txt
Last active January 20, 2017 18:16
AdblockPlus-compatible (used with uBlock Origin) filter list: Gets rid of the often vaguely-spammy third-party-powered "related links", at least as fully as possible
@bryanveloso
bryanveloso / brew-services.rb
Created December 8, 2011 09:39 — forked from lwe/brew-services.rb
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist. (This version fixes the deprecation warning raised on Formula.resolve_alias.)
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
@stevejenkins
stevejenkins / e4200-startup.sh
Last active March 29, 2018 10:03
Linksys E4200 v1 DD-WRT Startup Script
## Steve Jenkins' E4200 v1 Speed Optimizations
## Can be used on any Broadcom-based DD-WRT device
## PLEASE READ: http://wp.me/p1iGgP-DW
## Have fun, but use and tweak at your own risk :)
## Updated Feb 4, 2016
## INITIAL SLEEP COMMAND
## First command in script is ignored in some builds, so this is a throw-away
sleep 10
@rpavlik
rpavlik / OSVR-Data-Flow.md
Created March 30, 2015 16:38
OSVR Data flow doc

Data Flow in the OSVR Core

Ryan A. Pavlik, PhD (Sensics, Inc) - 29 March 2015

Introduction

The OSVR Core, and in particular the server, has among its primary concerns the management of device and analysis plugins, the maintenance of configuration and the semantic path tree, and the routing of input and output data. It conceptually uses a client-server model, though there is almost always a local (same machine) server, and the design does not require process separation. However, for simplicity, the following is written with separate client/server processes.

In important ways, analysis and hardware device plugins are similar, in that both can produce data that a client or an analysis plugin may request. Thus, both types are considered "logical devices", and "device" refers to this general characterization unless indicated otherwise.

@rpavlik
rpavlik / 99-sensics-usb.rules
Created November 23, 2015 19:42
Sensics Linux UDEV rules
# udev file for USB interfaces on Sensics-based HMDs and emulated devices
###
# Section to permit access to HID streaming
###
# OSVR HDK (via HIDAPI/libusb)
SUBSYSTEM=="usb", ATTRS{idVendor}=="1532", ATTRS{idProduct}=="0b00", MODE="0660", GROUP="plugdev"
@mastbaum
mastbaum / ftrapv.cpp
Created June 2, 2011 16:38
A demonstration of GCC's ftrapv flag for C++ integer overflow debugging
#include<iostream>
#include<signal.h>
#include<limits.h>
/** g++'s -ftrapv flag provides some protection against integer overflows. It
* is a little awkward to use, though. All it will do is "trap" -- you must
* provide a signal handler to deal with it.
*
* (You must compile with -ftrapv for this to work)
*/
@rpavlik
rpavlik / 1-README.md
Last active July 31, 2019 14:00
Spec and registry diffs between OpenXR 0.90 and 1.0

These are not exactly the released versions: I pre-processed them slightly to reduce diff noise, then ran the spec sources through https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/master/scripts/asciidoc-coalescer.rb to produce a single adoc file for each spec version. I then used git diff --patience on the combined adoc file and the XML registry.

As an obligatory note, these diffs aren't an official product of the working group, and they are not normative.

As diffs of the spec components, they carry the same license as those spec components.