git fetch <remote>
git checkout -b <branch> --track <remote>/<branch>
SSH into your EC2 instance. Run the following:
$ sudo yum install gcc This may return an "already installed" message. That's OK.
$ wget http://download.redis.io/redis-stable.tar.gz && tar xvzf redis-stable.tar.gz && cd redis-stable && make
The following should allow you to perform signed git actions without having to input your passphrase everytime (These steps are for OSX)
-
Install GPG tools
-
Uncomment line 199 in ~/.gnupg/gpg.conf that reads
use-agent -
Add the following to your bash 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
| # Automatic nginx virtual subdomains with sub-folders or sub-directories | |
| # | |
| # Since the original source where I found this code is now offline, I have decided to mirror it here. | |
| # All credit goes to: http://web.archive.org/web/20150307193208/http://www.messaliberty.com/2010/10/automatic-nginx-virtual-subdomains-with-sub-folders-or-sub-directories | |
| # | |
| # Description: In my web root directory I wanted create a folder called photos, and another called | |
| # music using a sftp program. Without manually going back to the config file or to the shell I like to | |
| # be able to access them at photos.nginxdomain.com and music.nginxdomain.com. That is what this config does. | |
| # Redirect visitors from http://nginxdomain.com/ to http://www.nginxdomain.com/ |
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 | |
| DBUSER="root"; | |
| DBPASS=""; | |
| DBHOST="localhost"; | |
| DB_OLD=mydatabase | |
| DB_NEW=clone_mydatabase | |
| DBCONN="--host=${DBHOST} --user=${DBUSER} --password=${DBPASS}"; |
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
| AWSTemplateFormatVersion: "2010-09-09" | |
| Description: S3 Queue Notifications Test | |
| Metadata: | |
| AWS::CloudFormation::Interface: | |
| ParameterGroups: | |
| - Label: | |
| default: Stack Variables | |
| Parameters: | |
| - Environment | |
| - Label: |
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 | |
| set -e | |
| # release defaults to patch (last number in semver) | |
| RELEASE="patch" && [ -n "$1" ] && RELEASE=$1 | |
| # cut the release | |
| VERSION=$(npm --no-git-tag-version version $RELEASE | sed 's/v//') | |
| git add package.json | |
| git commit -m "release: cut the $VERSION release" |
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
| #!/usr/bin/env bash | |
| set -e | |
| function usage() { | |
| set -e | |
| cat <<EOM | |
| ##### ecs-run ##### | |
| Simple script for running tasks on Amazon Elastic Container Service | |
| One of the following is required: | |
| Required arguments: |
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
| Using jq, we can convert between CloudFormation parameter files and CodePipeline template configuration files: | |
| $ jq '{ Parameters: [ .[] | { (.ParameterKey): .ParameterValue } ] | add } ' < cloudformation_parameter_file.json | |
| This is useful in the case of receiving 'Template configuration is not valid' when running a CloudFormation action. | |
| A CloudFormation parameter file has format: | |
| [ | |
| { |
echo '
#! /bin/bash
####### yum update is optional #####
#yum -y update
yum install firewalld -y
systemctl start firewalld
firewall-cmd --add-port=8300/tcp --add-port=8301/tcp --add-port=8302/tcp --add-port=8400/tcp --add-port=8500/tcp --add-port=80/tcp --add-port=443/tcp --permanentOlderNewer