This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Post install trigger for cobbler to | |
# kick of an ansible run on the target system. | |
# You can place an ansible.cfg in the same | |
# directory as your main playbook, so all | |
# stuff like inventory file etc. will be | |
# found the same way as if you run | |
# ansible-playbook in this directory | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#http://stackoverflow.com/questions/4284991/parsing-nested-parentheses-in-python-grab-content-by-level | |
def parenthetic_contents(string): | |
"""Generate parenthesized contents in string as pairs (level, contents).""" | |
stack = [] | |
for i, c in enumerate(string): | |
if c == '(': | |
stack.append(i) | |
elif c == ')' and stack: | |
start = stack.pop() | |
yield (len(stack), string[start + 1: i]) |
VirtualBox only officially supports OS X guests on an OS X host, but it is possible to create one on an OS X host and transfer it over to a Linux host. This tutorial will go over one possible way to accomplish this task.
- An Apple computer running OS X 10.11
- A Linux computer to transfer the VM over to
- 20 GB free on the Apple Machine
- 40 GB free on the Linux Machine
ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4
-r 24
- output frame rate-pattern_type glob -i '*.JPG'
- all JPG files in the current directory-i DSC_%04d.JPG
- e.g. DSC_0397.JPG-s hd1080
- 1920x1080 resolution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a BaseSystem.dmg with 10.13 Install Packages | |
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
hdiutil detach /Volumes/highsierra/ | |
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
#Setting up Docker Machine on Raspberry PI
- SSH into the pi and install docker with
curl -sSL https://get.docker.com | sh
(If we let Machine try to install the Docker daemon it will fail.) - Change the OS's ID so Docker Machine won't throw errors.
sudo nano /etc/os-release
and change the line that saysID=raspbian
toID=debian
- From a new terminal window run
docker-machine create --driver generic --generic-ip-address YOUR-PIS-IP --generic-ssh-key ~/.ssh/id_rsa --generic-ssh-user pi --engine-storage-driver overlay2 MACHINE-NAME