Skip to content

Instantly share code, notes, and snippets.

View neduma's full-sized avatar

Nedumaran Rajagopal neduma

View GitHub Profile
@neduma
neduma / bump
Last active January 30, 2020 18:52
0
@neduma
neduma / session.md
Last active October 29, 2019 16:38
Time Series Analytics on Session Log Data

Summary

This python program goes thru the files in given directory and parse all log files and filter unwanted data. Once data is filtered, The script uses pandas library to do analytics. It prints total number of unique users and top 10 sessions with shortest logest sessions along with page hits per user.

Runtime Requirements

- Python 3.7.4
- Pip Library: pandas 0.24.2
@neduma
neduma / Case-study-sre-best-practices.md
Last active September 27, 2019 20:55
Case Study - SRE Practices

Moovweb - New Platform

  • Allow devs to deploy universal react apps ( apps that support server side rendering.)
  • Cloud deploy, CLI Driven
    • Make sure devs have right IAM policies (Authz, AuthN, RBAC) in place in terms of who can deploy, change and update configs.
    • Code review is must / Gated deploy with approvals.

Clarification

  • Control Place / Deployment stack which deploys content to Delivery stack using ROR API wrapping AWS API deployed in Kubernetes and accessed by CLI
  • Delivery Plane / API Gateways and CDN Networks.
@neduma
neduma / auth-parse.py
Created May 31, 2018 06:29
auth.log failed ip count
#!/usr/bin/env python
import requests
import re
""" Extract failed ip from auth.log and with number of attempts """
log_url = "https://gist.githubusercontent.com/bholt/0b95ea35283b49bacd4a68d3970097fa/raw/c4335e725c0c87973e4fdb5069f06056763fbaa0/short.txt"
@neduma
neduma / auth.log
Created May 31, 2018 05:51
gist log
Dec 15 08:07:18 debby sshd[9244]: Did not receive identification string from 200.232.53.58
Dec 15 08:10:45 debby sshd[9251]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns1.teleeventos.com.br user=root
Dec 15 08:10:47 debby sshd[9251]: Failed password for root from 200.232.53.58 port 46974 ssh2
Dec 15 08:10:56 debby sshd[9253]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=ns1.teleeventos.com.br user=root
Dec 15 08:10:58 debby sshd[9253]: Failed password for root from 200.232.53.58 po rt 47109 ssh2
@neduma
neduma / brew.md
Created December 4, 2017 18:47
my brew list

list

❯ brew list
ack			git			libtasn1		protobuf
ammonite-repl		git-extras		libtiff			pstree
ant			git-flow-avh		libtool			pv
apr			glib			libunistring		pwgen
apr-util		glide			libyaml			py2cairo
asio			glog			lldpd			pyenv
@neduma
neduma / default.conf
Last active May 26, 2017 20:21
default.conf
server {
listen 80;
server_name localhost;
listen 443 ssl;
ssl_certificate /etc/ssl/certs/iapps-17-179-160-88.rno.apple.com_chained_cer.pem;
ssl_certificate_key /etc/ssl/private/iapps-17-179-160-88.rno.apple.com_noencrypt.pem;
#charset koi8-r;
@neduma
neduma / nginx.conf
Created February 16, 2017 23:53 — forked from asiegman/nginx.conf
nginx logstash output
# Output json-esque output for logstash to parse easily.
http {
# ...
log_format logstash_json '{"@timestamp": "$time_iso8601", '
'"remote_addr": "$remote_addr", '
'"remote_user": "$remote_user", '
'"body_bytes_sent": "$body_bytes_sent", '
'"request_time": "$request_time", '
function git-remove-tag {
if [[ -z $2 ]]; then remote="origin"; else remote=$2; fi
git tag -d $1; git push $remote :refs/tags/$1
}
##
for v in `git tag | grep "\d.\d.\d.\d"`; do git-remove-tag $v bucket; done
@neduma
neduma / RabbitMQ
Created November 11, 2015 18:41 — forked from defkef/RabbitMQ
RabbitMQ
## Docker Image
https://github.com/dockerfile/rabbitmq
https://github.com/mikaelhg/docker-rabbitmq
## Ruby Client
https://github.com/ruby-amqp/bunny
## Guides
http://rubybunny.info/articles/guides.html#amqp_091_model_concepts
http://www.rabbitmq.com/getstarted.html