Skip to content

Instantly share code, notes, and snippets.

Avatar

Ryan A. Pavlik rpavlik

View GitHub Profile
@rpavlik
rpavlik / properly-support-stow.patch
Created Mar 20, 2014
Patch for xpra 0.11.6 setup script to force a relative `etc` directory for use with stow, etc.
View properly-support-stow.patch
diff --git a/setup.py b/setup.py
index 5cfd4b7..40053ce 100755
--- a/setup.py
+++ b/setup.py
@@ -928,6 +928,7 @@ else:
#if we're not using the wrapper, don't install it
scripts.remove("scripts/xpra_Xdummy")
etc_files.append(xorg_conf)
+ etc_prefix='etc/xpra'
data_files.append((etc_prefix, etc_files))
@rpavlik
rpavlik / migratejobs.sh
Created Apr 18, 2014
Script for migrating just the basics of a Jenkins install
View migratejobs.sh
#!/bin/sh
SRCROOT=/media/da1ca593-583a-4f78-be0a-b0b628d726a4/var/lib/jenkins
DESTROOT=/var/lib/jenkins
SRCJOBS=${SRCROOT}/jobs
DESTJOBS=${DESTROOT}/jobs
for SRC in ${SRCJOBS}/*; do
if [ -d "${SRC}" -a -f "${SRC}/config.xml" ]; then
jobname=$(basename ${SRC})
@rpavlik
rpavlik / connectionsetup.msc
Created Apr 28, 2014
Deduced message sequence for setting up VRPN connections
View connectionsetup.msc
msc {
hscale = "2";
a [label="Server"], b [label="Client (UDP Capable)"], c [label="Client (TCP Only)"];
# A little vertical space
|||;
a box a [label="Listen on TCP port 3883", linecolor="red"];
a box a [label="Bind to UDP port 3883", linecolor="orange"];
...;
|||;
View D10apt-ftparchive
#!/bin/bash
# 2009-04-09 tyler - use previously built packages as an apt source
# http://blog.edseek.com/~jasonb/articles/pbuilder_backports/pbuilderbuild.html#pbuilderhook
echo Calling $0
: ${DIST:=$(lsb_release --short --codename)}
: ${ARCH:=$(dpkg --print-architecture)}
NAME="$DIST-$ARCH"
BUILDRESULT="/var/cache/pbuilder/$NAME/result/"
@rpavlik
rpavlik / command and warning
Last active Aug 29, 2015
Packaging differences (excluding the binary installers, obviously) between the Debian source package for NVIDIA's 331.79 drivers and my updated version with the 331.89 drivers.
View command and warning
rpavlik@obiwan:~/src/third-party/debian$ debdiff --exclude "*.run" nvidia-graphics-drivers_331.79-1.dsc nvidia-graphics-drivers_331.89-1~rpavlikjessie1.dsc
dpkg-source: warning: extracting unsigned source package (/home/rpavlik/src/third-party/debian/nvidia-graphics-drivers_331.89-1~rpavlikjessie1.dsc)
@rpavlik
rpavlik / spacemouse
Created Sep 3, 2014
SpaceMouse (Magellan) on Linux using VRPN
View spacemouse
#!/bin/sh
# shell script - put in bin along with your vrpn server
exec vrpn_server -f $(cd $(dirname $0) && cd ../etc && pwd)/spacemouse.cfg
@rpavlik
rpavlik / default.xml
Created Oct 31, 2014
Trying out repo for vr juggler
View default.xml
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="github"
fetch="https://github.com/" />
<default revision="refs/heads/master"
remote="github"
sync-j="4" />
<project name="vancegroup/gmtl" path="gmtl"/>
@rpavlik
rpavlik / CMakeBoostHelper.cmake
Created Nov 14, 2014
Script to help CMake find Boost from the new installers
View CMakeBoostHelper.cmake
# Original author: Ryan Pavlik <ryan@sensics.com> <ryan.pavlik@gmail.com
# Released with the same license as needed to integrate into CMake.
# Help CMake find recent Boost MSVC binaries without manual configuration.
if(MSVC AND (NOT Boost_INCLUDE_DIR OR NOT Boost_LIBRARY_DIR))
math(EXPR _vs_ver "${MSVC_VERSION} / 100 - 6")
if(CMAKE_CXX_SIZEOF_DATA_PTR EQUAL 8)
set(_libdir "lib64-msvc-${_vs_ver}.0")
else()
set(_libdir "lib32-msvc-${_vs_ver}.0")
@rpavlik
rpavlik / ChocolateyInstall.ps1
Created Dec 30, 2014
Visual Studio 2013.4 Express for Windows Desktop
View ChocolateyInstall.ps1
if(Get-Module Boxstarter.Chocolatey){
if(Test-PendingReboot){
Invoke-Reboot
}
}
$ieKey="HKLM:\Software\Microsoft\Internet Explorer"
if(Get-ItemProperty -Path $ieKey -Name "svcVersion" -ErrorAction SilentlyContinue){
$ieVersion=(Get-ItemProperty -Path $ieKey -Name "svcVersion").svcVersion
$majorVersion = [int]$ieVersion.Substring(0,2)
View boxstarter.ps1
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowFileExtensions
#Enable-RemoteDesktop
cinst git
#cinst javaruntime
cinst dotnet4.5
cinst notepadplusplus
cinst 7zip
cinst sysinternals
cinst putty