Note
If you can provide affirmative responses to the questions below AND supporting, non-expired documentation, you may skip ALL remaining questions.
Note
If ‘Yes,’ please provide an updated revision covering material changes.
Note
If you can provide affirmative responses to the questions below AND supporting, non-expired documentation, you may skip ALL remaining questions.
Note
If ‘Yes,’ please provide an updated revision covering material changes.
Originally from: wmutschl/mutschler.eu#13 (comment)
cryptsetup luksFormat /dev/nvme0n1p4
Ensure swap partition shows as linux-swap in gparted. If not, open gparted and decrypt the swap drive and then reformat as swap again.
| #! /usr/bin/env bash | |
| if [[ -z $NYU_AUTHGROUP || -z $NYU_NETID || -z $NYU_PASSWORD || -z $NYU_2FA ]]; then | |
| cat << EOF | |
| One or more env varibles missing | |
| \$NYU_AUTHGROUP | |
| - "NYU VPN: NYU-NET Traffic Only" | |
| - "NYU VPN: All Traffic" |
| #!/usr/bin/env bash | |
| set -Eeuo pipefail | |
| trap cleanup SIGINT SIGTERM ERR EXIT | |
| script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
| usage() { | |
| cat <<EOF | |
| Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
| const getBTreeDepth = (tree) => { | |
| const isEmpty = arr => arr.every(item => item === -1) | |
| let nodes = 1; | |
| let depth = 0; | |
| let start = 0; | |
| let end = 1; | |
| while (nodes <= tree.length) { |
| /** | |
| * Convert character string to binary | |
| * | |
| * @param {String} str Character string | |
| * @returns Binary String | |
| */ | |
| function toBinary(str) { | |
| let binary = ''; | |
| for (let i = 0, l = str.length; i < l; i++) { | |
| binary += str.codePointAt(i).toString(2).padStart(8, '0'); |
| --- Step 1 - exchanged common values | |
| Initial common values: | |
| p = 13 (prime number) | |
| g = 7 | |
| --- Step 2 - Each user creates own secret number | |
| Alice secret number: | |
| a = 5 |
| /** | |
| * Add two bits together and get resulting bits | |
| * | |
| * @param {Number} a bit a | |
| * @param {Number} b bit b | |
| * @returns {Array<Number, Number>} Carry and sum as a result of addition | |
| */ | |
| function addBits(a, b){ | |
| return [ +( a && b ), +( a !== b ) ]; |
| # Setup firewall | |
| sudo ufw allow ssh | |
| sudo ufw allow http | |
| sudo ufw allow https | |
| # Install nextcloud | |
| sudo snap install nextcloud | |
| # Update memory limit | |
| sudo snap set nextcloud php.memory-limit=1024M |
| # We're currently on `non-working` branch, and we've identified a previous working commit of `abcdef123456`. | |
| # We want to go back to commit `abcdef123456`, and then start work anew from there | |
| # First checkout to the working commit `abcdef123456` | |
| git checkout abcdef123456 | |
| # You'll be in a temporary staging area now. If we want to make changes now, we'll need to copy the current commit | |
| # into a new branch. | |
| git checkout -b previous-working-branch |