Skip to content

Instantly share code, notes, and snippets.

@nsteele
nsteele / vagrantize_prls.bash
Last active April 18, 2022 16:23
Convert parallels vm to vagrant
#!/bin/bash
# These instructions/commands intend to allow use of the vagrant command line tools with an existing Parallels virtual machine
# i.e. a .pvm subdirectory in your Parallels directory (~/Parallels/...)
# NOTE!! These instructions disable synced folder /vagrant
# these instructions assume that your newly vagrant-ized box is called provider/mybox
# make vagrant box directory
mkdir ~/.vagrant.d/boxes/prls-VAGRANTSLASH-mybox/1.0/parallels
@nsteele
nsteele / glx.bash
Last active July 15, 2021 03:35
Enable glx between mac client and linux server
#!/bin/bash
# on macOS, enable indirect opengl vi xquartz
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
# ssh to linux server with x forwarding, and start an opengl app
ssh -X user@linux_server
glxgears
# note that using indirect rendering (which is the case when going over ssh), xquartz only supports up to opengl 1.4
@nsteele
nsteele / xforward.bash
Last active February 13, 2017 17:42
Enable x forwarding with an Ubuntu server
#!/bin/bash
# On the server side
sudo apt-get install xauth
vi /etc/ssh/sshd_config # Add line: X11Forwarding yes
# On client side
vi ~/.ssh/config # Add line: ForwardX11 yes
@nsteele
nsteele / discoverMAC.bash
Created January 25, 2017 16:27
Discover MAC address of network device, for `udev` rule writing or other purposes
#!/bin/bash
sudo lshw -C network
# to see the default logical names of the network interfaces
sudo lshw -short -C network