- You have a VM with small disk
- You have GPT partition table
- You NOT USE LVM (you should)
- You need to extend a partition on the main drive
- You use Debian 8.x aka Jessie
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
qrencode "WIFI:T:WPA;S:${SSID};P:${PASSWORD};;" -o wifi.png |
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
[Unit] | |
Description=Keeps a tunnel to 'remote.example.com' open | |
After=network.target | |
[Service] | |
User=autossh | |
# -p [PORT] | |
# -l [user] | |
# -M 0 --> no monitoring | |
# -N Just open the connection and do nothing (not interactive) |
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
#!/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...] |
title | subtitle | author | date | source |
---|---|---|---|---|
Docker Compose Cheatsheet |
Quick reference for Docker Compose commands and config files |
Jon LaBelle |
April 7, 2019 |
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
# Track time of execution | |
RPROMPT="[%D{%F}T%*]" | |
TMOUT=1 | |
TRAPALRM() { | |
zle reset-prompt | |
} |
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
provider "aws" { | |
region = "eu-west-1" | |
} | |
# Lambda | |
resource "aws_lambda_function" "tf-example" { | |
function_name = "ServerlessExample" | |
# The bucket name as created earlier with "aws s3api create-bucket" | |
s3_bucket = "tf-example-store" |
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
1. list all remote tags | |
git ls-remote --tags | |
2. delete local tag | |
git tag -d v1.0.1 | |
3. push tag deletion to remote | |
git push origin :refs/tags/v1.0.1 | |
4. tag local branch again |
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
### Source: https://coderwall.com/p/t_sz3q/generate-uuid-at-shell-prompt | |
# alias uuid="python -c 'import sys,uuid; sys.stdout.write(str(uuid.uuid4()))' | pbcopy && pbpaste && echo" | |
alias uuid="uuidgen | tr -d '\n' | tr '[:upper:]' '[:lower:]' | pbcopy && pbpaste && echo" |