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/sh -e | |
# | |
# Install node_exporter for linux-amd64 | |
# Usage: curl -sSL https://gist.githubusercontent.com/lecoueyl/ebc747f91f386db14c6b5cb71f007fd5/raw/node-exporter-installer.sh | sudo sh | |
# | |
# | |
# Source: https://github.com/ClouDesire/node-exporter-installer | |
EXPORTER_VERSION=0.17.0 | |
RELEASE=node_exporter-${EXPORTER_VERSION}.linux-amd64 |
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 | |
# Archive a wordpress folder with is database | |
# Usage: ./wp-backup.sh -s '/my/wordpress/folder' -d $HOME -g 'my-google-space-bucket' | |
# | |
# | |
# Source: https://gist.githubusercontent.com/lecoueyl/0cf49d38fa0b0205f51ca9db75b1f548/raw | |
set -o pipefail | |
set -o nounset |
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 | |
# Single remote server automation deployment | |
set -o pipefail | |
set -o nounset | |
# Options | |
################################################################################ |
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
alias webcode="curl -o /dev/null --silent --head --write-out '%{http_code}\n'" |
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
# | |
# Autocomplete a ssh command with AWS instances hostname | |
# Put this file in /etc/bash_completion.d/ (Ubuntu) | |
# | |
# File containing ec2 instances hostname | |
HOSTS=/tmp/aws_hosts_list | |
_ssh_hosts() | |
{ |
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
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
git clone https://github.com/rbenv/ruby-build.git /usr/local/rbenv/plugins/ruby-build | |
# Add rbenv to the path: | |
echo '# rbenv setup - only add RBENV PATH variables if no single user install found' > /etc/profile.d/rbenv.sh | |
echo 'if [[ ! -d "${HOME}/.rbenv" ]]; then' >> /etc/profile.d/rbenv.sh | |
echo ' export RBENV_ROOT=/usr/local/rbenv' >> /etc/profile.d/rbenv.sh | |
echo ' export PATH="$RBENV_ROOT/bin:$PATH"' >> /etc/profile.d/rbenv.sh | |
echo ' eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh |