Skip to content

Instantly share code, notes, and snippets.

declare @CustomerID int
set @CustomerID = 342
--Original statement
select aut.[Token]
, aut.[UserName]
, aut.[LastAuthenticationTime]
, aut.[LoginSourceType]
, aut.[AuthenticationRetries]
, aut.[MarketName]
#!/bin/bash
# http://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html#sysman-install-ssm-agent
cd /tmp
sudo yum install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm
# Redis cluster
sudo yum install ruby -y
gem install redis
wget http://download.redis.io/redis-stable/src/redis-trib.rb
chmod +x ./redis-trib.rb
./redis-trib.rb create 172.31.11.148:6379 172.31.12.11:6379 172.31.10.4:6379
# /etc/redis.conf
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
# Redis on RedHat 7.2
# To execute:
# curl -s 'https://gist.githubusercontent.com/vkhazin/f5c1b6e36e3a6c29aaf882041aaf78cb/raw/76de41b46cbf3749291ae87eef18cb71ce4c4d05/redhat-redis-setup.sh' | sh
sudo yum install wget -y
wget -r --no-parent -A 'epel-release-*.rpm' http://dl.fedoraproject.org/pub/epel/7/x86_64/e/
sudo rpm -Uvh dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-*.rpm
sudo yum install redis -y
sudo mkdir /etc/redis
sudo semanage port -a -p tcp 16379 -t redis_port_t
sudo mv /etc/redis.conf /etc/redis.conf.bak