Skip to content

Instantly share code, notes, and snippets.

@shawnhank
shawnhank / install.md
Created Nov 27, 2021 — forked from hagmonk/install.md
K3OS on Raspberry Pi
View install.md

Imaging

Assuming macOS and an SD card presented as /dev/rdisk3:

For ARMv7 (Pi 2):

diskutil unmountDisk disk3
xzcat ubuntu-18.04.2-preinstalled-server-armhf+raspi2.img.xz | sudo dd of=/dev/rdisk3 bs=32m
@shawnhank
shawnhank / 01)JavaScript Syntax Check.sh
Created Nov 23, 2021 — forked from seiz/01)JavaScript Syntax Check.sh
BBedit Script to syntax check a JavaScript-File with jshint.
View 01)JavaScript Syntax Check.sh
#!/bin/bash
/usr/local/bin/jshint "$BB_DOC_PATH" | bbresults -e --pattern '(?P<file>.+?):\sline\s(?P<line>\d+),\scol\s((?P<col>\d+),)?\s+(?P<msg>.*)$'
@shawnhank
shawnhank / 00)JSON Syntax Check.sh
Created Nov 23, 2021 — forked from seiz/00)JSON Syntax Check.sh
BBedit Script to syntax check a JSON-File with jsonlint. Thanks to the new "bbresults", this is a piece of cake.
View 00)JSON Syntax Check.sh
#!/bin/bash
/usr/local/bin/jsonlint -cq 2>&1 "$BB_DOC_PATH" | bbresults -e --pattern '(?P<file>.+?):\sline\s(?P<line>\d+),\scol\s((?P<col>\d+),)?\s+(?P<msg>.*)$'
@shawnhank
shawnhank / vcsa-kvm.yml
Created Nov 10, 2021 — forked from infernix/vcsa-kvm.yml
Create a VMware VCSA appliance under KVM with libvirt and ansible
View vcsa-kvm.yml
---
- name: Generate a KVM enabled VMWare VCSA VM under libvirt
hosts: 127.0.0.1
connection: local
vars:
- reqpkgs_apt:
- bsdtar
- libguestfs-tools
- qemu-utils
- virtinst
@shawnhank
shawnhank / del_cluster.sh
Created Nov 10, 2021 — forked from ianchen06/del_cluster.sh
delete proxmox cluster
View del_cluster.sh
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# edit through sqlite, check, delete, verify
@shawnhank
shawnhank / Catalina_ISO.sh
Created Nov 8, 2021 — forked from Kutkovsky/Catalina_ISO.sh
The steps allowing to create macOS 10.15 Catalina VM on vSphere or ESXi
View Catalina_ISO.sh
#!/bin/bash
# Steps to create the macOS Catalina (10.15) VM:
# login to developer.apple.com or beta.apple.com to download a tester's profile for your OS. Install it.
# Go to System Preferences > Software Update and start the update process
# When the Catalina Installer (few MBytes) is started, it downloads the remain part of installation.
# After all `Install Catalina Beta.app` should lay in the /Applications folder with approx. 6.5g size
# Proceed with the following script.
set -eux
@shawnhank
shawnhank / macos-installer-to-iso.sh
Created Nov 8, 2021 — forked from esutton/macos-installer-to-iso.sh
Create macOS Catalina Bootable ISO Image
View macos-installer-to-iso.sh
#!/bin/sh
#
# File: macos-installer-to-iso.sh
#
# Create a bootable ISO image from a macOS installer to install VMware ESXi guests.
#
# https://gist.github.com/Kutkovsky/613e29f35d3ef420b23b59ecdf7a28e0
# Debug on: set -x
set -eux
@shawnhank
shawnhank / macos-installer-to-iso.sh
Created Nov 8, 2021 — forked from tedneward/macos-installer-to-iso.sh
Create macOS Catalina Bootable ISO Image
View macos-installer-to-iso.sh
#!/bin/sh
#
# File: macos-installer-to-iso.sh
#
# Create a bootable ISO image from a macOS installer to install VMware ESXi guests.
#
# https://gist.github.com/Kutkovsky/613e29f35d3ef420b23b59ecdf7a28e0
# Debug on: set -x
set -eux
@shawnhank
shawnhank / macOS-ISO-howto.md
Created Nov 8, 2021 — forked from kdubau/macOS-ISO-howto.md
How to create a bootable ISO of macOS install application.
View macOS-ISO-howto.md

Download

First download the install app bundle. Older versions can be hard to find but the current version of the time you read this, can be found in the App Store.

Create and attach a drive wtih hdiutil

To create a drive run this command: hdiutil create -o /tmp/Mojave.cdr -size 6200m -layout SPUD -fs HFS+J.
Next you will need to mount that drive hdiutil attach /tmp/Mojave.cdr.dmg -noverify -mountpoint /Volumes/install_build.

Create installation media in the new drive

Use the downloaded app bundle to create the media: sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build.

@shawnhank
shawnhank / SSL-certs-OSX.md
Created Nov 2, 2021 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names
View SSL-certs-OSX.md

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   = my-project.dev

Additional FQDNs can be added if required: