Skip to content

Instantly share code, notes, and snippets.

View lokeb's full-sized avatar

Loknath Bharti lokeb

View GitHub Profile
@lokeb
lokeb / jack.rb
Last active November 21, 2020 03:19 — forked from jaygooby/jack.rb
#does not work Homebrew formula to install JackOSX binary package.
require 'formula'
class Jack2 <Formula
homepage 'http://jackaudio.org'
version '1.9.16'
url 'https://github.com/jackaudio/jack2-releases/releases/download/v1.9.16/jack2-macOS-v1.9.16.tar.gz'
def install
system "xar -xf jack2-osx-1.9.16.pkg"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CGPDeviceCategory</key>
<string>GamePad</string>
<key>CGPDeviceType</key>
<string>PS3</string>
<key>CGPDisplayNameOvr</key>
<string>DualShock3 Analogue Triggers</string>
@lokeb
lokeb / parse-options.sh
Created April 24, 2021 00:46 — forked from cosimo/parse-options.sh
Example of how to parse options with bash/getopt
#!/bin/bash
#
# Example of how to parse short/long options with 'getopt'
#
OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"`
if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi
echo "$OPTS"