Skip to content

Instantly share code, notes, and snippets.

View jordanwesthoff's full-sized avatar

Jordan Westhoff jordanwesthoff

View GitHub Profile
@jordanwesthoff
jordanwesthoff / doxconver_init.sh
Last active August 29, 2015 14:07
Dpxconvert
#!/bin/bash
# Simplistic steps to install dpxconvert
# Make sure you are in the directory 'Sweenet Arriraw_1_0'
# example /Users/user/Downloads/Sweeney\ Arriraw_1_0
# Make sure to install the dpxconvert dependency, libTiff, before dpxconvert
cd src
cd tiff-3.8.0
make
@jordanwesthoff
jordanwesthoff / gist:010a4562ba10a0de0178
Created October 20, 2014 19:44
Network Stack Settings for UltraGrid on OSX
# Extending network buffers for UltraGrid on OSX
# Edit: /etc/sysctl.conf
# Extended network buffers for UltraGrid
kern.ipc.maxsockbuf=33554432
net.inet.udp.recvspace=5944320
sudo nvram boot-args="ncl=131072" # for OS X 10.6
@jordanwesthoff
jordanwesthoff / CUDA_path_change.sh
Created October 8, 2014 19:24
Fixing UltraGrid libcudart.so.6: Cannot open shared directory problem.
#!/bin/bash
#
# This is a quick and simple way to bind to the correct version of CUDA to the operating libraries in Linux.
# Very common issue [last tested, Ubuntu 14.04 LTS] after installing CUDA and STITOLA UltraGrid - also hard to google.
echo 'MODIFYING PATH TO MAKE CUDA WORK'
sudo ldconfig /usr/local/cuda/lib64
@jordanwesthoff
jordanwesthoff / disk_speed.sh
Created July 14, 2014 15:32
This is a basic gist for testing the disk speed of your system. It writes a pre-specified quantity of MB to the drive and measures the time. Following that, it then reads the same bytes to see how long it takes as well. I got this off of a random forum a long, long time ago and have modified it a bit as the time has passed; it's pretty handy.
#!/bin/bash
# Jordan Westhoff, RIT 2014
read -p "Batch size for test (enter in MB) {1024MB in a GB}" sze
echo "Testing Disk Speed"
echo "$sze MB sample size"
dd if=/dev/zero of=test bs=1048576 count=$sze
@jordanwesthoff
jordanwesthoff / cp_progress.sh
Last active August 29, 2015 14:02
{linux} cp with progress bar operation
#!/bin/sh
cp_p()
{
strace -q -ewrite cp -- "${1}" "${2}" 2>&1 \
| awk '{
count += $NF
if (count % 10 == 0) {
percent = count / total_size * 100
printf "%3d%% [", percent
for (i=0;i<=percent;i++)
@jordanwesthoff
jordanwesthoff / 0_reuse_code.js
Created June 4, 2014 15:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console