Skip to content

Instantly share code, notes, and snippets.

@marshki
marshki / mixer.sh
Created April 18, 2024 14:07
BigFix auto installer for GNU/Linux (Ubuntu OS), written in Bash.
#!/usr/bin/env bash
set -e
# Set 'Computer Name' to serial number.
# Download, unzip, install, and cleanup BigFix GNU/Linux.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2023-11-08
# License: MIT
@marshki
marshki / fixer.sh
Last active April 18, 2024 14:05
BigFix auto installer for macOS, written in Bash.
#!/usr/bin/env bash
set -e
# Set macOS 'Computer Name' to serial number.
# Download, unzip, install, and cleanup BigFix in macOS.
#
# Author: M. Krinitz <mjk235 [at] nyu [dot] edu>
# Date: 2023-11-08
# License: MIT
@marshki
marshki / smarty_pants.sh
Last active February 27, 2024 23:42
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 / Get-DirSize.ps1
Created October 19, 2021 16:14
PowerShell scipt to print sub-dirs of named dir--or present working dir (PWD)--sorted by size.
<#
.SYNOPSIS
Print sub-dirs of named dir--or present working dir (PWD)--sorted by size.
.Parameter Path
[sr-en] Specifies path of interest.
.Example
# Named directory.
PS> ./Get-DirSize.ps1 -Path "C:\USERS"
@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 / mount_googledrive_linux.md
Last active May 31, 2023 12:57
Mount Google Drive via command line interface (CLI) in Ubuntu.

Mount Google Drive in Ubuntu ☁️💾

Scope: Mount Google Drive from a terminal using Google Drive Ocamlfuse.

Preflight check ✔️✈️

You'll need the following package:

  • google-drive-ocamlfuse

You may install it via the Apt package manager: