This file contains hidden or 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. Install from curl -L https://toolbelt.treasuredata.com/sh/install-amazon1-td-agent3.sh | sh | |
2. Run td-agent-gem install fluent-plugin-http | |
3. Replace `endpoint` with `url` on the `match` section | |
4. Profit! |
This file contains hidden or 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
# /root/.unison/10Documents.prf | |
# Create one config file for each folder, or add one per | |
# root folder and add subfolders via | |
# path = 10Documents | |
# path = 20Media | |
# To make this unison job load at machine startup use an init-script | |
# or systemd service such as | |
# https://gist.github.com/thunfischbrot/0b6a21a84f166c4fa74fc5df4a470b17 | |
# local root to sync |
This file contains hidden or 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 Unison | |
sudo apt install unison | |
# Install Fsmonitor | |
sudo pip install fsmonitor | |
# /etc/systemd/system/[email protected] | |
# Starts unison with the .prf-config of your choice | |
# Create a unison .prf-config such as | |
# https://gist.github.com/thunfischbrot/3efbd4a87785615a61e4f5fd875f2699 |
This file contains hidden or 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 and create certificates | |
certbot-auto certonly -d *.domain.com -d domain.com --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns |
This file contains hidden or 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
aws ec2 modify-image-attribute --image-id ami-0abcdef1234567890 --launch-permission "Add=[{UserId=123456789012}]" |
This file contains hidden or 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
find $LOCATION -name $REQUIRED_FILES -type f -mmin +360 -delete |
This file contains hidden or 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
fallocate -l 4G /swapfile | |
chmod 600 /swapfile | |
mkswap /swapfile | |
swapon /swapfile | |
echo "/swapfile swap swap sw 0 0" >> /etc/fstab |
This file contains hidden or 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 | |
# Install UniFi Controller. Check CentOS 7 (7.0.1406) | |
# Date: 28/02/2016 | |
# Step 1. Add mongo-db repo | |
cat <<EOF > /etc/yum.repos.d/mongodb.repo | |
[mongodb] | |
name=MongoDB Repository | |
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64/ | |
gpgcheck=0 |
This file contains hidden or 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
curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip" | |
unzip awscli-bundle.zip | |
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws |