Skip to content

Instantly share code, notes, and snippets.

View ob1-sc's full-sized avatar

Simon O'Brien ob1-sc

  • VMware
  • United Kingdom
View GitHub Profile
@ob1-sc
ob1-sc / git-execute-perm
Created June 18, 2018 11:55
Add execute permission in git
git update-index --chmod=+x <file>
@ob1-sc
ob1-sc / masked-input-bat-script
Created May 9, 2018 18:12
Accept masked input from bat script
@echo off
set "psCommand=powershell -Command "$pword = read-host 'Enter Password' -AsSecureString ; ^
$BSTR=[System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($pword); ^
[System.Runtime.InteropServices.Marshal]::PtrToStringAuto($BSTR)""
for /f "usebackq delims=" %%p in (`%psCommand%`) do set password=%%p
echo %password%
@ob1-sc
ob1-sc / disable-dell-nipple
Last active May 6, 2018 19:53
Disable Dell Nipple :)
Add the following script to /etc/profile.d
#!/bin/bash
xinput -set-prop "DualPoint Stick" "Device Enabled" 0
@ob1-sc
ob1-sc / ssh-key
Created March 1, 2018 14:28
Generate SSH Key
# generate ssh private/public key
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# start ssh agent in background
eval "$(ssh-agent -s)"
# add ssh private key to agent
ssh-add ~/.ssh/id_rsa
# copy to clipboard (xclip needs to be installed)
@ob1-sc
ob1-sc / concourse-cheat-sheet
Last active March 1, 2018 14:28
Concourse - Cheat Sheet
cat <yaml to patch> | yaml-patch -o <yaml patch file> > <patched yaml>
@ob1-sc
ob1-sc / bosh-cheat-sheet
Last active March 1, 2018 14:28
BOSH - Cheat Sheet
# Configure local alias
bosh alias-env <bosh alias name> -e <bosh director ip> --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
# Log in to the Director
export BOSH_CLIENT=admin
export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`
# Query the Director for more info
bosh -e <bosh alias name> env