Skip to content

Instantly share code, notes, and snippets.

@sibte
sibte / lpass-ssh.sh
Created June 30, 2016 22:13 — forked from Luzifer/lpass-ssh.sh
`lpass-ssh` wrapper script #blog
#!/bin/bash
KEY_NAME=$1
if ! ( which lpass > /dev/null ); then
echo "LastPass CLI is required."
exit 2
fi
# Require something to be passed to this command
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten