title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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 Apache. | |
yum install --quiet -y httpd httpd-devel | |
# Copy configuration files. | |
cp httpd.conf /etc/httpd/conf/httpd.conf | |
cp httpd-vhosts.conf /etc/httpd/conf-vhosts.conf | |
# Start Apache and configure it to run at boot. | |
service httpd start | |
chkconfig httpd on |
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
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Install Apache. | |
yum: name={{ item }} state=present | |
with_items: | |
- httpd |
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
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: set timezone to Europe/London | |
timezone: | |
name: Europe/London |
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
--- | |
- hosts: all | |
become: yes | |
tasks: | |
- name: Install system updates for centos systems | |
yum: | |
name: '*' | |
state: latest |
title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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 | |
# | |
# Do you have multiple AWS profiles? | |
# Here is how I deal with them. | |
# | |
# Make sure you add "${HOME}/.bash_aws_profile" to your .bashrc or .bash_profile so | |
# all new terminal sessions are updated with your choice. | |
# | |
aws-swap(){ | |
unset AWS_DEFAULT_PROFILE |
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
# Not originally created by me btw. | |
# Handy python timestamp trick | |
function p-timestamp() { | |
python -c 'import sys,time;sys.stdout.write("".join\ | |
(( " ".join((time.strftime("[%Y-%m-%d %H:%M:%S]", time.localtime())\ | |
, line)) for line in sys.stdin )))' | |
} | |
## Custom echo that adds a timestamp | |
function echo() { |
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
# base requirements | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo apt-get install -y python-setuptools python-dev libffi-dev libssl-dev git sshpass tree | |
sudo easy_install pip | |
sudo -H pip install cryptography | |
# sudo -H pip install ansible==2.1.1.0 if you don't need virtualenv | |
# virtualenv |
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
ssh-keygen -y -f aws_private_key.pem > aws_public_key.pub |