Skip to content

Instantly share code, notes, and snippets.


Ryan A. Pavlik rpavlik

View GitHub Profile
View boxstarter.ps1
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
cinst git
cinst javaruntime
cinst dotnet4.5
cinst notepadplusplus
cinst 7zip
cinst sysinternals
cinst putty
rpavlik / gist:262ca7bdb7bf7b29b254
Created Jan 19, 2015
Install Boxstarter as LocalSystem account on Jenkins node
View gist:262ca7bdb7bf7b29b254
println "powershell -NoProfile -ExecutionPolicy unrestricted -Command \"iex ((new-object net.webclient).DownloadString(''))\" && SET PATH=%PATH%;%ALLUSERSPROFILE%\\chocolatey\\bin".execute().text
println "powershell -ExecutionPolicy unrestricted -Command \"choco install Boxstarter\"".execute().text
View intrusive_ptr_COM.h
/** @file
@brief Header providing for usage of boost::intrusive_ptr with COM.
Based on the header found at:
It is essentially the code from the author's blog post,
, which describes usage and motivation more. However, it appears to have
some small improvements (mainly in style, and C++11 usage), and usefully,
rpavlik / Automation Gamepad.au3
Created May 11, 2015
Using a gamepad for utility buttons
View Automation Gamepad.au3
#include <Joystick.au3>
#include <File.au3>
;_________________ SETUP_____________________________________
Local $joy, $coor, $btns, $split
Local $prevbtns[32]
Local $actions[32]
For $i=0 To 31
$prevbtns[$i] = 0
rpavlik / upgrade.cmd
Created Jun 24, 2015
Batch file to safely update MSYS2 - place in msys2 root dir (by the rest of the batch files) and run until it says "done!"
View upgrade.cmd
@echo off
cd /d "%~dp0"
set WD=%~dp0usr\bin\
echo Syncing package databases
"%WD%bash" --login -c "pacman -Sy"
if %errorlevel% neq 0 exit /b %errorlevel%
echo Upgrading core packages
"%WD%bash" --login -c "pacman --needed -S bash pacman pacman-mirrors msys2-runtime"
rpavlik /
Created Jul 9, 2015
shell snippet to parse Jenkins matrix build info
# Given a string describing a matrix build as Jenkins Copy-Artifacts does
# (like ANDROID_ABI=armeabi-v7a,label=ndk) on the pipeline, get the named field.
# Example: echo ANDROID_ABI=armeabi-v7a,label=ndk | getMatrixField ANDROID_ABI
# outputs armeabi-v7a to stdout.
getMatrixField() {
tr ',' '\n' | grep "$1" | cut --only-delimited -d = -f 2
rpavlik / eigen 3.2.5 warning.txt
Created Aug 19, 2015
MSVC 2013 warning with Eigen 3.2.5
View eigen 3.2.5 warning.txt
14>c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/Quaternion.h(291): warning C4522: 'Eigen::Quaternion<float,0>' : multiple assignment operators specified (C:\Users\Ryan\Desktop\src\OSVR-Core\src\osvr\Util\MatrixConventionsC.cpp)
14> c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/arch/Geometry_SSE.h(22) : see reference to class template instantiation 'Eigen::Quaternion<float,0>' being compiled
14> c:\users\ryan\desktop\src\osvr-core\vendor\eigen-3.2.5\eigen\src/Geometry/arch/Geometry_SSE.h(38) : see reference to class template instantiation 'Eigen::internal::quat_product<1,Derived,OtherDerived,float,1>' being compiled
View gist:105109
if __name__ == '__main__':
screens = display.get_screens()
if len(screens) > 1:
w = MTWindow( fullscreen=True, config=screens[1].get_best_config())
#w = MTWindow( fullscreen=True, screens=screens[1])
rpavlik / quaternion rate.cpp
Created Aug 31, 2015
Conversion to a quaternion rate
View quaternion rate.cpp
// Given XYZ radians per second velocity.
q_from_euler(vel_quat, angVel[2] * vel_quat_dt, angVel[1] * vel_quat_dt,
angVel[0] * vel_quat_dt);
// Small angle approximation from exponential map
vel_quat[Q_X] = angVel[0] * 0.5 * vel_quat_dt;
vel_quat[Q_Y] = angVel[1] * 0.5 * vel_quat_dt;
vel_quat[Q_Z] = angVel[2] * 0.5 * vel_quat_dt;
vel_quat[Q_W] = 1.0;
q_normalize(vel_quat, vel_quat);
View gist:473266
diff --git a/Library/Formula/cppcheck.rb b/Library/Formula/cppcheck.rb
index d9b43ab..409d7d4 100644
--- a/Library/Formula/cppcheck.rb
+++ b/Library/Formula/cppcheck.rb
@@ -1,17 +1,18 @@
require 'formula'
class Cppcheck < Formula
- url ''
+ url ''