Skip to content

Instantly share code, notes, and snippets.

@marshki
marshki / disk_check.sh
Last active August 14, 2024 01:48
Bash check for Offlne (Onln=Online|Offln=Offline) disk using 'storecli' and 'awk' on MegaRAID controller cards.
#!/usr/bin/env bash
#
# disk_check
#
# Emit warning if disk(s) on RAID controller cards found to be in "Offln" state
# storcli reference: https://docs.broadcom.com/doc/12352476
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 09-Aug-2024
# License: MIT
@marshki
marshki / mixer.sh
Last active October 29, 2024 19:19
BigFix auto installer for GNU/Linux (Ubuntu OS), written in Bash.
#!/usr/bin/env bash
#
# mixer
#
# Download, unzip, and install BigFix in GNU/Linux.
# 'Computer Name' is set to serial number in this script.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2024-10-28
# License: MIT
@marshki
marshki / fixer.sh
Last active October 29, 2024 17:30
BigFix auto installer for macOS, written in Bash.
#!/usr/bin/env bash
#
# fixer
#
# Download, unzip, and install BigFix in macOS.
# A device's unique identifier in the BigFix console is its serial number.
# 'Computer name' is set to serial number in this script.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2024-10-10
@marshki
marshki / smarty_pants.sh
Last active November 9, 2024 16:30
Parse SMART Monitor test results for bad sector count, drive info.
#!/usr/bin/env bash
#
# smarty_pants
#
# Parse SMART Monitor test results for bad sector count, drive info.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 16-Jul-2021
# License: MIT
#
@marshki
marshki / inode_eraser.sh
Last active July 5, 2023 19:54
Nuke inodes on: /dev/md0 partition (Synology) if capacity >= 90%.
#!/usr/bin/env bash
#
# inode_eraser
#
# Nuke inodes on: /dev/md0 partition (Synology) if capacity >= 90%.
# Place file in: /usr/local/bin.
# Set permisisons: chmod 644.
# Set cronjob by editing: /etc/crontab, & restart service: systemctl restart crond
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
@marshki
marshki / capacitOR.sh
Last active July 22, 2023 15:43
Bash snippet to emit warning if capacity on disk(s) is ninety percent (90%) or more.
#!/usr/bin/env bash
#
# capacitOR
#
# Emit warning if capacity on disk(s) is ninety percent (90%) or more.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 22-Jul-2023
# License: MIT
@marshki
marshki / extractor.sh
Last active March 30, 2023 14:24
Create text files with parsed data, suitable for import into Google Groups.
#!/usr/bin/env bash
#
# extractor
#
# Create text files with parsed data, suitable for import into Google Groups.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2021.05.15
# License: MIT
@marshki
marshki / boilerplate.sh
Created July 31, 2021 15:00
A boilerplate script for retrieving and installing .deb files, using TeamViewer as an example. Easy to modify!
#!/usr/bin/env bash
#
# boilerplate
#
# A boilerplate script for retrieving and installing .deb files, using TeamViewer as an example. Easy to modify!
#
# Author: M. Krinitz
# Date: 2021.07.31
# License: MIT
@marshki
marshki / nyu_hpc_data_transfer.md
Last active February 26, 2021 14:42
Transfer data from source to destination on NYU's high performance computing (HPC) cluster.

Transfer Data to NYU's HPC 🚀

Scope: Transfer data to NYU's high performance computing (HPC) cluster.

Summary of access nodes on "Greene":

Fully-qualified domain name (FQDN) Purpose
gdtn.hpc.nyu.edu Data transfer node (DTN)
greene.hpc.nyu.edu Login node
@marshki
marshki / NYU_VPN_Linux.md
Last active June 14, 2024 13:29
Connect to NYU-NET via OpenConnect VPN client from a command-line interface (CLI), in GNU/Linux, and macOS.

Connect to NYU-NET via VPN in GNU/Linux--Debian, Fedora, Ubuntu--(and macOS) 🔐

Scope: Use OpenConnect VPN client to connect to NYU-NET, the university's wide-area network (WAN).

Preflight check ✔️✈️

You'll need one or more of the following packages:

  • openconnect
  • network-manager-openconnect
  • network-manager-openconnect-gnome