Skip to content

Instantly share code, notes, and snippets.

View shawnhank's full-sized avatar

Shawn Hank shawnhank

View GitHub Profile
#!/bin/sh
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "------------------------------------------------------------------------------------"
echo "Mac setup initialised. Please make sure you change the settings before running this."
echo "Any questions, ask James."
echo " "
echo "WARNING:"
echo "Do not run this script on an existing Mac as it changes a lot and may kill your installation".
#!/bin/sh
# Homebrew Script for OSX
# To execute: save and `chmod +x ./brew-install-script.sh` then `./brew-install-script.sh`
echo "Install Oh My Zsh"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo "Installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@shawnhank
shawnhank / urlsafari
Created October 19, 2021 18:04 — forked from kshiteesh/urlsafari
This AppleScript saves all the tabs open in all Safari windows to a Markdown file.
(*
Export All Safari Tabs in All Open Windows to a Markdown File
July 13, 2015
// SCRIPT PAGE
http://hegde.me/urlsafari
// ORIGINAL SCRIPT ON WHICH THIS SCRIPT IS BUILT
http://veritrope.com/code/export-all-safari-tabs-to-a-text-file
@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.
@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 / 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 / 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 / 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 / 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