Skip to content

Instantly share code, notes, and snippets.

View ThisIsNoahEvans's full-sized avatar

Noah Evans ThisIsNoahEvans

View GitHub Profile
@ThisIsNoahEvans
ThisIsNoahEvans / Generate self-signed SSL certs & keys from a script.md
Last active January 11, 2023 21:27
Generate self-signed SSL certs & keys from a script

I usually use this for generating SSL certificates for IP addresses - such as internally hosted applications, so they can be secured properly. You will need to manually install and trust the certificate on all clients that wish to access the service with SSL, and provide the cert & key to the service.

This is not a guide! It is simply a script I wrote in about 5 minutes to quickly generate certificates for IP addresses. It is very badly written but it works. Just about.

I won't be maintaining this unless the entire premise of SSL and self-signed certificates magically breaks overnight.

@iambenmitchell
iambenmitchell / gist:5060ce76189e4514eb69f4d107f0c53f
Created November 12, 2020 12:30
Fix macOS Big Sur RC update
The issue is caused by an incorrect software catelog. As apple is releasing big sur thursday, they changed the software catelog to the production one. The problem is that the production one does not yet have the bridge os firmware for big sur just yet. So in order to update right now you need to change back to the devleoper catelog.
//Set software catalog to developer
sudo nvram IASUCatalogURL=https://swscan.apple.com/content/catalogs/others/index-10.16seed-10.16-10.15-10.14-10.13-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog
// Once updated, restore your NVRAM back to default for future updates
sudo nvram -d IASUCatalogURL
@iambenmitchell
iambenmitchell / getT2.sh
Last active September 7, 2020 12:40
Get T2 Information from macOS using bash.
#NOTE: THIS SUBMITS YOUR NON PERSONAL INFO TO A DATABASE, remove the line as stated below(curl).
# The purpose of the database is to help sites like The iPhone Wiki. No personal information is collected.
#!/bin/bash
clear
ChipID=$(/usr/libexec/remotectl get-property localbridge ChipID)
BoardRevision=$(/usr/libexec/remotectl get-property localbridge BoardRevision)
BoardId=$(/usr/libexec/remotectl get-property localbridge BoardId)
HWModel=$(/usr/libexec/remotectl get-property localbridge HWModel)
macModel=$(/usr/sbin/system_profiler SPHardwareDataType | grep "Model Identifier")
echo "This tool will get you detailed information about your T2 chip."