Skip to content

Instantly share code, notes, and snippets.

@s1carii
s1carii / macOSkickstart.sh
Last active January 6, 2025 14:19
Steps to configure new macOS system
#!/bin/sh
# Installs Homebrew (https://brew.sh), brew packages, and then modifies settings for fresh macOS devices
# Created 11/22/21
# Updated:
# - 1/30/24
# - 1/6/25
# Install homebrew per brew.sh
echo "Installing Homebrew..."
@s1carii
s1carii / dellRename.bat
Last active May 19, 2022 14:58
Dell Rename to Hardware Serial Number
PowerShell -WindowStyle Hidden -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%~dp0Rename.ps1""' -Verb RunAs}"
@s1carii
s1carii / NewFedora.sh
Last active July 29, 2019 13:37
Fedora Environment Setup From Minimal Install
#!/usr/bin/env bash
## Initial setup of new Fedora installation
# Check for root
if ! [ $(id -u) = 0 ]; then echo "Error: This script must be run with sudo or as root."; exit 1; fi
# Minimal KDE environment packages modified from https://github.com/Zer0CoolX/Fedora-KDE-Minimal-Install-Guide/blob/master/fedora-kde-min-packages.sh on 5/11/19
KDE=(
NetworkManager-config-connectivity-fedora
@s1carii
s1carii / esxi-bak.txt
Last active March 18, 2019 19:39
Manual backup procedure for running ESXi VMs; works, script to be tested
# Potential solution:
#!/bin/sh
# create storage directory for vm backup
mkdir -p /vmfs/volumes/datastore1/web01-backup/
# copy config files for the running VM
cp /vmfs/volumes/datastore1/web01/web01.vmx /vmfs/volumes/datastore1/web01-backup/web01.vmx
cp /vmfs/volumes/datastore1/web01/web01.nvram /vmfs/volumes/datastore1/web01-backup/web01.nvram
cp /vmfs/volumes/datastore1/web01/web01.vmsd /vmfs/volumes/datastore1/web01-backup/web01.vmsd
@s1carii
s1carii / sublimetext_h&e.txt
Last active March 18, 2019 15:57
Make home and end behave "normally" in Sublime Text on Mac
[ // Make home and end behave "normally":
{ // Go to the beginning of the current line
"keys": ["home"],
"command": "move_to",
"args": {"to": "bol"}
},
{ // Highlight to the beginning of the current line
"keys": ["shift+home"],
"command": "move_to",
"args": {"to": "bol", "extend": true}
@s1carii
s1carii / firefoxInstall.bat
Last active January 30, 2019 15:47
Firefox .msi Install OneLiner
msiexec /passive /norestart /i "https://download.mozilla.org/?product=firefox-msi-latest-ssl&os=win64&lang=en-US"
@s1carii
s1carii / lambdaStack.txt
Last active March 29, 2019 13:26
LambdaStack install on Ubuntu 18.04
#LambdaStack install on Ubuntu 18.04 from https://lambdalabs.com/lambda-stack-deep-learning-software on 1/23/19
LAMBDA_REPO=$(mktemp) && \
wget -O${LAMBDA_REPO} https://lambdalabs.com/static/misc/lambda-stack-repo.deb && \
sudo dpkg -i ${LAMBDA_REPO} && rm -f ${LAMBDA_REPO} && \
sudo apt-get update && sudo apt-get install -y lambda-stack-cuda
@s1carii
s1carii / FODs.ps1
Last active March 20, 2025 16:39
1809 RSAT and OpenSSH Installation with "Add-WindowsCapability failed. Error code = 0x800f0954" Workaround
# https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
# If WSUS doesn't have the FODs you have to temporarily disable updates from the WSUS endpoint in the registry
$currentWU = Get-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" | select -ExpandProperty UseWUServer
Set-ItemProperty -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" -Name "UseWUServer" -Value 0
Restart-Service wuauserv
# Install the OpenSSH Client and Server
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
@s1carii
s1carii / libvirtSetup.txt
Last active March 9, 2019 16:09
Steps for user libvirt access
# New users will not have access to virt-manager without being added to the libvirt group
sudo usermod -aG [username] libvirt
# Set the env for the user to kill the error
export LC_ALL=C