Skip to content

Instantly share code, notes, and snippets.

View shawnhank's full-sized avatar

Shawn Hank shawnhank

View GitHub Profile
@shawnhank
shawnhank / 01)JavaScript Syntax Check.sh
Created November 23, 2021 20:31 — forked from seiz/01)JavaScript Syntax Check.sh
BBedit Script to syntax check a JavaScript-File with jshint.
#!/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 November 23, 2021 20:28 — 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.
#!/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 November 10, 2021 08:32 — forked from infernix/vcsa-kvm.yml
Create a VMware VCSA appliance under KVM with libvirt and ansible
---
- 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 November 10, 2021 04:38 — forked from ianchen06/del_cluster.sh
delete proxmox cluster
# 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 November 8, 2021 22:28 — forked from Kutkovsky/Catalina_ISO.sh
The steps allowing to create macOS 10.15 Catalina VM on vSphere or ESXi
#!/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 November 8, 2021 22:27 — forked from esutton/macos-installer-to-iso.sh
Create macOS Catalina Bootable ISO Image
#!/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 November 8, 2021 22:27 — forked from tedneward/macos-installer-to-iso.sh
Create macOS Catalina Bootable ISO Image
#!/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 November 8, 2021 08:35 — forked from kdubau/macOS-ISO-howto.md
How to create a bootable ISO of macOS install application.

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 November 2, 2021 18:25 — forked from croxton/SSL-certs-OSX.md
Generate ssl certificates with Subject Alt Names

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:

@shawnhank
shawnhank / DevonThink Search operators
Created October 31, 2021 19:10 — forked from florido/DevonThink Search operators
DevonThink Search operators
DevonThink Search operators
In the toolbar search field, as well as in both the interactive and the simple web interface, you can use standard and extended Boolean operators, parenthesis, and more to fine tune your search.
The syntax of the operators is compatible to DEVONagent and EasyFind, the Finder, Spotlight, common search engines as well as common programming languages such as C, C++, Objective-C, Java, and JavaScript. The complexity of the query is unlimited.
Case
All terms are case-insensitive. You may, if you wish, use capitalization for proper names in a query, but DEVONthink Pro Office will ignore case in interpreting the query.