$ sudo apt-get install xinput$ xinput --list| #!/usr/bin/env bash | |
| # Map Caps Lock key to Left Control key | |
| # https://developer.apple.com/library/content/technotes/tn2450/_index.html | |
| # This doesnt work. Reverts on restart | |
| # hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000039,"HIDKeyboardModifierMappingDst":0x7000000E0}]}' | |
| # References: | |
| # https://github.com/mathiasbynens/dotfiles/issues/310 | |
| # https://gist.github.com/scottstanfield/0f8ce63271bebfb5cf2bb91e72c71f91 | |
| # The last link didnt work for me on Sierra or High Sierra. I could not find IOHIDKeyboard but |
| $EC2SettingsFile="C:\\Program Files\\Amazon\\Ec2ConfigService\\Settings\\BundleConfig.xml" | |
| $xml = [xml](get-content $EC2SettingsFile) | |
| $xmlElement = $xml.get_DocumentElement() | |
| foreach ($element in $xmlElement.Property) | |
| { | |
| if ($element.Name -eq "AutoSysprep") | |
| { | |
| $element.Value="Yes" | |
| } |
| { | |
| "AWSAccountActivityAccess": { | |
| "Arn": "arn:aws:iam::aws:policy/AWSAccountActivityAccess", | |
| "AttachmentCount": 0, | |
| "CreateDate": "2015-02-06T18:41:18+00:00", | |
| "DefaultVersionId": "v1", | |
| "Document": { | |
| "Statement": [ | |
| { | |
| "Action": [ |
Paraphrased/edited/slightly updated form of: http://mike.teczno.com/notes/disposable-virtualbox-lxc-environments.html
Download an Ubuntu Server ISO (http://www.ubuntu.com/download/server)
Create a new VMWare virtual machine, select boot from the ISO with 2 NICs configured as "Share with My Mac" & "Private to my Mac" respectively. During the creation of the Ubuntu VM there will be a page to select installed software, select "OpenSSH server".
| 1) ==== Autossh using systemd ==== | |
| Example from | |
| https://gist.github.com/drmalex07/c0f9304deea566842490 | |
| 2) ============= | |
| Install autossh |
| // recover from audacity crash | |
| // usage: | |
| // node audacity_rescue.js [sourcedir] [result_file.wav] [mono|stereo] | |
| // the mono or stereo option is optional, the default is mono. | |
| // | |
| // Description: | |
| // This script will sort all files on modification date. | |
| // If you create a backup, make sure you use `cp -a` to preserve the modification date | |
| // or create a zip. |
| #!/bin/bash | |
| #Recover from an Audacity 2.0 crash by reassembling the saved data files | |
| #Based on https://gist.github.com/912222 | |
| if [ $# != 2 ]; then | |
| echo "ERROR: Not enough arguments" | |
| echo "$0 [SOURCE PATH] [DESTINATION]" | |
| exit 1 | |
| fi |
| #! /bin/bash | |
| # Description: show dependency tree | |
| # Author: damphat | |
| if [ $# != 1 ]; then | |
| echo 'Usage: apt-rdepends-tree <package>' | |
| echo 'Required packages: apt-rdepends' | |
| exit 1 | |
| fi |