This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
function die() { | |
local MSG="${1}" | |
echo "${MSG}" | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euexport NVME_DEVICE_MD_PATH=/dev/md/ephemeral_drive | |
export NVME_DEVICE_MAPPER_PATH=/dev/mapper/nvme_ephemeral_drive | |
export NVME_EPHEMERAL_MOUNT_PATH=/scratch | |
export NVME_EPHEMERAL_DEVICES=$(ls /dev/disk/by-id/nvme-Amazon_EC2_NVMe_Instance_Storage_*)mkdir $NVME_EPHEMERAL_MOUNT_PATH | |
chown root: $NVME_EPHEMERAL_MOUNT_PATH | |
chmod 1777 $NVME_EPHEMERAL_MOUNT_PATHmdadm --create $NVME_DEVICE_MD_PATH --level=0 --run --raid-devices=2 $NVME_EPHEMERAL_DEVICES --verbose | |
udevadm control --start-exec-queue | |
udevadm settle | |
mkfs.xfs $NVME_DEVICE_MD_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMGCQxyA6VK3c8USiMkhWz+accbxFuMql+Smo8qgyEm8IoIAOWyvjdHs4zsByfSUSTSJ3TqydMJQTx+SS3zbfPEVVhmM/BmNrDuvsHfssuXgs6Ob7KD+UzD8VrQlrPApVKunSm72ZWH95QlOD3jdWFr6pnV9YAgxpMwz2x7CxXmRe9ZgFwh4lAdo7VTeADZHMJAt0f0bBQecxBFGTTYZ71ehqsYKhXilbmnpHFBNFdyBEEszGFQjF1djniaD3Rk480pFDb3D24lNUbb8kdVujhd+9ZdDJ09WJuzPMVqCp+1Lz1tbqsNCHF1LCupcb1+V6YCz1geQE6DspVWfaOwd95 rahij@hackercave.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am rahij on github. | |
* I am rahij (https://keybase.io/rahij) on keybase. | |
* I have a public key whose fingerprint is DD05 38F3 635C 3E13 07D2 8A24 4B14 3E67 CE9C 1598 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get update | |
apt-get install build-essential | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... |