Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Leonardo Comelli leocomelli

🏠
Working from home
View GitHub Profile
@leocomelli
leocomelli / gcp_compute_mount_persistent_disk.sh
Created Mar 31, 2020 — forked from raj-saxena/gcp_compute_mount_persistent_disk.sh
Use the following script to mount a persistent storage during startup. This is helpful when you provision the compute instance as well as the persistent disk using some automation tool like Terraform. StackOverFlow question - https://stackoverflow.com/questions/53162620/automate-gcp-persistent-disk-initialization
View gcp_compute_mount_persistent_disk.sh
#!/bin/bash
set -euxo pipefail
MNT_DIR=/mnt/disks/persistent_storage
if [[ -d "$MNT_DIR" ]]; then
exit
else
sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb; \
sudo mkdir -p $MNT_DIR
@leocomelli
leocomelli / git.md
Last active Aug 5, 2021
Lista de comandos úteis do GIT
View git.md

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda