Skip to content

Instantly share code, notes, and snippets.

View baskaran-md's full-sized avatar
🎯
Focusing

Baskaran Deivasigamani baskaran-md

🎯
Focusing
View GitHub Profile
@baskaran-md
baskaran-md / QuotaPolicy
Created November 6, 2014 06:53
QuotaPolicy
<Quota async="false" continueOnError="false" enabled="true" name="QuotaPolicy" type="calendar">
<DisplayName>Quota 3</DisplayName>
<Allow count="2000" countRef="request.header.allowed_quota"/>
<Interval ref="request.header.quota_count">1</Interval>
<Distributed>false</Distributed>
<Synchronous>false</Synchronous>
<TimeUnit ref="request.header.quota_timeout">month</TimeUnit>
<StartTime>2014-7-16 12:00:00</StartTime>
<Identifier/>
<MessageWeight ref="client.received.content.length"/>
@baskaran-md
baskaran-md / curl httpbin.org
Created December 1, 2014 19:31
httpbin.org

[baskar@Hercules profiles]$ curl -v http://httpbin.org/get

Hostname was NOT found in DNS cache

Could not resolve host: httpbin.org

Closing connection 0

curl: (6) Could not resolve host: httpbin.org

@baskaran-md
baskaran-md / nginx.conf
Last active December 17, 2017 06:57
nginx.conf - 5xx,4xx
###
# THIS NGINX IS TUNED FOR PERFORMANCE
###
#user nobody;
worker_processes 8;
worker_rlimit_nofile 100000;
events {
@baskaran-md
baskaran-md / nginx.conf
Created December 10, 2014 18:17
nginx.conf - SSL Target
#user nobody;
worker_processes 8;
worker_rlimit_nofile 100000;
events {
worker_connections 4000;
# optmized to serve many clients with each thread, essential for linux
use epoll;
@baskaran-md
baskaran-md / .bashrc
Created December 10, 2014 22:38
root - bashrc
# Set this if the PATH is different for sudo.
alias sudo='sudo env PATH=$PATH'
@baskaran-md
baskaran-md / gist:6e1a6fb8d1e56270974f
Created February 11, 2015 01:56
Conditional Flows
<Flow name="UseCase1">
<!-- Cassandra Heavy! -->
<Request>
<Step>
<FaultRules/>
<Name>ValidateKey</Name>
<Condition>request.queryparam._excludeVerify != "false"</Condition>
</Step>
<Step>
@baskaran-md
baskaran-md / var_log_messages
Created January 21, 2016 18:29
System Log | ami-4444c72c | RightImage_CentOS_7.0_x64_v14.1.4_HVM_EBS
[root@ip-10-17-6-4 ~]# curl -s http://169.254.169.254/latest/meta-data/ami-id
ami-4444c72c
======================================================================================================
[root@ip-10-17-6-4 ~]# cat /etc/*rel*
CentOS Linux release 7.0.1406 (Core)
cat: /etc/lsb-release.d: Is a directory
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
@baskaran-md
baskaran-md / git_merge.sh
Created February 28, 2017 19:34
Function for git rebase and merge
export X_BLUE="\033[0;34m"
export X_BOLD="\033[1m"
export X_CYAN="\033[1;36m"
export X_GREEN="\033[0;32m"
export X_NC="\033[0m"
export X_RED="\033[0;31m"
export X_YELLOW="\033[1;33m"
##
resource "aws_iam_role" "role" {
name = "test_role"
assume_role_policy = "${data.aws_iam_policy_document.ec2-principal.json}"
}
resource "aws_iam_instance_profile" "test_profile" {
name = "test_profile"
role = "${aws_iam_role.role.name}"
}
@baskaran-md
baskaran-md / terraform_validate.log
Created April 24, 2017 19:12
terraform validate
[iam/terraform] (master) >>> terraform validate
2017/04/24 12:11:12 [INFO] Terraform version: 0.9.3 1601af7a076fd03fe940455db7fd01dfa747c795
2017/04/24 12:11:12 [INFO] Go runtime version: go1.8
2017/04/24 12:11:12 [INFO] CLI args: []string{"$HOME/bin/terraform", "validate"}
2017/04/24 12:11:12 [DEBUG] Detected home directory from env var: $HOME
2017/04/24 12:11:12 [DEBUG] Detected home directory from env var: $HOME
2017/04/24 12:11:12 [DEBUG] Attempting to open CLI config file: $HOME/.terraformrc
2017/04/24 12:11:12 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2017/04/24 12:11:12 [DEBUG] Detected home directory from env var: $HOME
2017/04/24 12:11:12 [INFO] CLI command args: []string{"validate"}