Skip to content

Instantly share code, notes, and snippets.

View jeremygaither's full-sized avatar

Jeremy Gaither jeremygaither

View GitHub Profile
@jeremygaither
jeremygaither / unlock-vaults.md
Last active August 10, 2022 12:29
Gist from Drafts

unlock macOS vaults from command line (eg: over ssh)

#!/usr/bin/env bash

security -i unlock-keychain ~/Library/Keychains/vaultname.keychain-db 
security -i unlock-keychain ~/Library/Keychains/login.keychain-db
$nvmexe = $null
$nodeexe = "node.exe"
if ($null -eq $env:NVM_HOME) {
Write-Output "NVM is not installed, or not installed correctly..."
} else {
Write-Output "NVM_HOME=$env:NVM_HOME"
Write-Output "NVM_SYMLINK=$env:NVM_SYMLINK"
Write-Output "PATH=$env:PATH"
@jeremygaither
jeremygaither / 1-macOS-10.15-catalina-setup.md
Created November 25, 2019 21:47 — forked from kevinelliott/1-macOS-10.15-catalina-setup.md
macOS 10.15 Catalina Mostly-Automated Setup

To support my open-source work, consider adding me on Patreon.

macOS 10.15 Catalina Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.15 Catalina.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@jeremygaither
jeremygaither / set-macOS-hostname.md
Created November 12, 2019 19:09
Set macOS hostname info properly
@jeremygaither
jeremygaither / octodeployfilter.ps1
Created October 2, 2018 00:54 — forked from Dalmirog-zz/file.ps1
New Release for specific machines
$apiKey = "" #Octopus API Key
$OctopusURL = "" #Octopus URL
$Header = @{ "X-Octopus-ApiKey" = $apiKey }
$ProjectName = "" #project name
$EnvironmentName = "" #environment name
[string[]]$filter = "" #Pattern to filter machines. e.g. "*:10934","*db*","http://Webserver1"
#!/bin/bash -e
## Connects to a Windows AWS EC2 instance with clipboard and drive redirection
## automatically using the password encrypted with EC2 keys. Copy the instance
## ID to your clipboard, and execute the script. The password will be placed in
## your clipboard, and your Remote Desktop client will be used to connect.
if [[ -z "$1" ]]; then
INSTANCE=$(pbpaste)
else
@jeremygaither
jeremygaither / private_fork.md
Created March 26, 2018 20:15 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

docker-compose stop
docker system prune --force
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
$memoryManagementPath = "HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
$virtualizationPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Virtualization"
New-ItemProperty -Path $memoryManagementPath -Name "FeatureSettingsOverride" -Value 0 -PropertyType "DWord" -Force | Out-Null
New-ItemProperty -Path $memoryManagementPath -Name "FeatureSettingsOverrideMask" -Value 3 -PropertyType "DWord" -Force | Out-Null
if (!(Test-Path $virtualizationPath)) {
New-Item -Path $virtualizationPath -Force | Out-Null
}
#!/bin/bash
pacman --sync --refresh --sysupgrade
pacman --sync --noconfirm --needed \
make \
base-devel \
mingw-w64-i686-toolchain \
mingw-w64-x86_64-toolchain \
mingw-w64-i686-cmake \