This file contains hidden or 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 | |
# | |
# Copyright (c) Citrix Systems 2007-2011 | |
# Author: Gianni Tedesco and Dave Scott | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU Lesser General Public License as published | |
# by the Free Software Foundation; version 2.1 only. with the special | |
# exception on linking described in file LICENSE. | |
# |
This file contains hidden or 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
Open Terminal, then run the following commands one at a time: | |
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J | |
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build | |
asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages | |
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/ | |
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist | |
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg | |
hdiutil detach /Volumes/install_app |
This file contains hidden or 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
# API credentials | |
# | |
# Amazon S3: | |
#AWS_ACCESS_KEY=<MY_ACCESS_KEY> | |
#AWS_SECRET_ACCESS_KEY=<MY_SECRET_ACCESS_KEY> | |
# | |
# Backblaze B2: | |
B2_ACCOUNT_ID=<B2_ACCOUNT_ID> | |
B2_ACCOUNT_KEY=<B2_ACCOUNT_KEY> | |
# |
This file contains hidden or 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/env bash | |
# Fail early if we weren't given enough parameters | |
if [[ $# -lt 2 ]]; then | |
echo "Usage: $0 <path_to_env_vars> <action> [debug]" | |
exit 1 | |
fi | |
## === DEFAULTS === ## | |
RESTICPATH="/opt/restic" |
This file contains hidden or 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
#!/bin/bash | |
[ "$1" ] || { echo "usage: $0 PIPE"; exit 1; } | |
echo "Press Ctrl+Q to quit..." | |
trap "stty sane" 0 1 2 3 15 | |
sudo -u vbox socat unix-connect:$1 stdio,raw,echo=0,escape=0x11,icanon=0 |
This file contains hidden or 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
#!/bin/bash | |
if [[ $# -lt 2 ]]; then | |
echo "Usage $0 'VM_NAME' /path/to/image.iso" | |
exit 1 | |
fi | |
VMNAME="$1" | |
ISOIMAGE="$2" |
This file contains hidden or 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
[Service] | |
ExecStart= | |
ExecStart=-/usr/bin/htop | |
StandardInput=tty | |
StandardOutput=tty |
This file contains hidden or 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
[Unit] | |
Description=VirtualBox Virtual Machine %i Service | |
Requires=systemd-modules-load.service | |
After=systemd-modules-load.service vboxdrv.service | |
[Service] | |
User=vbox | |
Group=vboxusers | |
ExecStart=/usr/bin/VBoxHeadless -s %i | |
ExecStop=/usr/bin/VBoxManage controlvm %i acpipowerbutton |
This file contains hidden or 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
#!/bin/bash | |
# | |
# Copyright (C) Matthieu Patou <[email protected]> 2010-2011 | |
# Copyright (C) Preston Kutzner <[email protected]> 2018 | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 3 of the License, or | |
# (at your option) any later version. | |
# |
This file contains hidden or 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
#!/bin/bash | |
set -u | |
THELIST=( 'one' 'two' 'three' 'four' 'five' 'six' 'seven' 'eight' 'nine' 'ten' ) | |
THEITEM='twelve' | |
declare -a EXTLIST=() | |
EXTLIST=( 'eleven' 'twelve' ) | |
if [[ ${#EXTLIST[@]} -gt 0 ]]; then | |
THELIST+=( "${EXTLIST[@]}" ) |