Vagrant uses Virtualbox to manage the virtual dependencies. You can directly download virtualbox and install or use homebrew for it.
$ brew cask install virtualboxNow install Vagrant either from the website or use homebrew for installing it.
| """ | |
| A simple script to kick off a certain ROP remotely, optionally | |
| with a given framerange. | |
| Usage: hython path/to/script/houBatch.py /path/to/hipfile /hou/path/to/rop | |
| TODO: Add options for multiple ROPs, hperf. | |
| """ | |
| import hou, sys |
| -- You need to open AppleScript Editor, paste the code and adapt the pListFile variable | |
| -- Then export the script (File > Export) and save it as an application (activate "Stay open after run handler") | |
| global plistFile | |
| on run | |
| -- The plist file will be different on your system. You can find out the filename by running the following line in a terminal window | |
| -- $ ls ~/Library/Preferences/ByHost/com.apple.notificationcenterui.*.plist | |
| set plistFile to "~/Library/Preferences/ByHost/com.apple.notificationcenterui.C9C4D4C4-E6DF-59FC-9BF4-25514282C806.plist" | |
| checkStatus() |
| { | |
| "AWSTemplateFormatVersion" : "2010-09-09", | |
| "Description" : "This template creates a VPC with a private subnet for the SAP backend and a public subnet with openVPN server.", | |
| "Parameters" : { | |
| "AdminCidrIp" : { | |
| "Type" : "String", | |
| "Description" : "Source CIDR block for administrating the openVPN server", |
| Sometimes that "quick" refactor takes longer than I was planning for. Then it's nice to commit changes to a temporary "dirty" feature branch just to have an off-laptop backup and change history. I use this method for storing a bunch of trash commits on a feature branch and then lifting them back over to master when I want to continue work / clean up. | |
| # Check out the branch you want to start working from | |
| git checkout master | |
| # Check out the dirty "refactor" branch as staged changes | |
| git checkout refactor -- . | |
| # Reset will unstage the changes | |
| git reset |
| Question: | |
| . How to run Ansible without specifying the inventory but the host directly? | |
| . Run a playbook or command with arbitrary host not in the inventory hosts list? | |
| . run ansible with arbitrary host/ip without inventory? | |
| Answer: | |
| Surprisingly, the trick is to append a , | |
| The host parameter preceding the , can be either a hostname or an IPv4/v6 address. | |
| ansible all -i example.com, |
Spawning multiple ffmpeg processes with xargs:
On standard NVIDIA GPUs (Not the Quadros and Tesla lines), NVENC encodes are limited to two simultaneous sessions. The sample below illustrates how to pass a list of AVI files to ffmpeg and encode them to HEVC on two encode sessions:
$ find Videos/ -type f -name \*.avi -print | sed 's/.avi$//' |\
xargs -n 1 -I@ -P 2 ffmpeg -i "@.avi" -c:a aac -c:v hevc_nvenc "@.mp4"
This will find all files with the ending .avi in the directory Videos/ and transcode them into HEVC/H265+AAC files with the ending .mp4. The noteworthy part here is the -P 2 to xargs, which starts up to two processes in parallel.
These are the steps required to replace a directory with a submodule in git. Note: Assumes that you are currently working on branch called 'develop'
git checkout -b creating-submodulerm -rf path/of/directory/to/be/replacedgit add . then git commit -m "removing local directory"git submodule add "https://github.com/repoName" path/of/directory/to/be/replacedgit add . then git commit -m "adding submodule"git checkout developgit submodule foreach git fetch --tags then git submodule update --init --recursive