Skip to content

Instantly share code, notes, and snippets.

View comjf's full-sized avatar

James Flowers comjf

  • DC
View GitHub Profile
#!/bin/bash
# Get pci-id host GPU
host_gpu=$(lspci | grep "GTX 980" | awk 'NR==1{print $1;}')
host_gpu_audio=$(echo $host_gpu | sed -e 's/\.0$/.1/')
# Get pci-id/vendor-id/device-id guest GPU
guest_gpu=$(lspci | grep "GTX 980" | awk 'NR==2{print $1;}')
guest_gpu_vendor=$(cat /sys/bus/pci/devices/0000:$guest_gpu/vendor)
guest_gpu_device=$(cat /sys/bus/pci/devices/0000:$guest_gpu/device)
// Run in the JavaScript console of the hterm browser window
// Clear all existing settings - you probably don't want to do this.
// Preferences are now stored in "chrome.storage.sync" instead of
// "window.localStorage" so if you clear your preferences the changes
// will be propagated to other devices.
//term_.prefs_.storage.clear();
var htermProfiles = [
@comjf
comjf / ar_bug
Last active December 25, 2015 20:29
Active Record Possible Bug: https://github.com/rails/rails/issues/12570
gemfile_path = "#{File.basename(__FILE__, '.rb')}.gemfile"
ENV['BUNDLE_GEMFILE'] = File.expand_path(gemfile_path)
unless File.exists?(gemfile_path)
File.write(gemfile_path, <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', '4.0.1.rc1'
gem 'sqlite3'
GEMFILE