Skip to content

Instantly share code, notes, and snippets.

View krishnakanthpps's full-sized avatar

Krishnakanth krishnakanthpps

View GitHub Profile
@krishnakanthpps
krishnakanthpps / csv-to-json.php
Last active August 29, 2015 14:26 — forked from robflaherty/csv-to-json.php
Convert CSV to JSON
<?php
/*
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on php.net
*/
header('Content-type: application/json');
// Set your CSV feed
@krishnakanthpps
krishnakanthpps / influxdb-grafana-howto.sh
Last active September 20, 2015 19:29 — forked from otoolep/influxdb-grafana-howto.sh
Shell script to download, and configure, InfluxDB, nginx, and Grafana
#!/bin/bash
# Check out the blog post at:
#
# http://www.philipotoole.com/influxdb-and-grafana-howto
#
# for full details on how to use this script.
AWS_EC2_HOSTNAME_URL=http://169.254.169.254/latest/meta-data/public-hostname
INFLUXDB_DATABASE=test1
@krishnakanthpps
krishnakanthpps / app-perf.md
Created October 13, 2015 12:47 — forked from larahogan/app-perf.md
Native app performance metrics

Native app performance metrics

This is a draft list of what we're thinking about measuring in Etsy's native apps.

Currently we're looking at how to measure these things with Espresso and Kif (or if each metric is even possible to measure in an automated way). We'd like to build internal dashboards and alerts around regressions in these metrics using automated tests. In the future, we'll want to measure most of these things with RUM too.

Overall app metrics

  • App launch time - how long does it take between tapping the icon and being able to interact with the app?
  • Time to complete critical flows - using automated testing, how long does it take a user to finish the checkout flow, etc.?
  • Battery usage, including radio usage and GPS usage
  • Peak memory allocation
@krishnakanthpps
krishnakanthpps / docker.json
Created March 31, 2016 09:19 — forked from hitsujiwool/docker.json
docker + docker-compose on Amazon Linux
{
"variables": {
"aws_access_key": "{{env `AWS_ACCESS_KEY`}}",
"aws_secret_key": "{{env `AWS_SECRET_KEY`}}"
},
"builders": [
{
"type": "amazon-ebs",
"ssh_pty": true,
"access_key": "{{user `aws_access_key`}}",
@krishnakanthpps
krishnakanthpps / 1_Dockerised_JMeter.md
Created April 19, 2016 09:35 — forked from hhcordero/1_Dockerised_JMeter.md
Dockerized JMeter - A Distributed Load Testing Workflow
@krishnakanthpps
krishnakanthpps / grafana-dashboard-exporter
Created September 12, 2016 08:20 — forked from crisidev/grafana-dashboard-exporter
Command to export all grafana 2 dashboard to JSON using curl
KEY=XXXXXXXXXXXX
HOST="https://metrics.crisidev.org"
mkdir -p dashboards && for dash in $(curl -k -H "Authorization: Bearer $KEY" $HOST/api/search\?query\=\& |tr ']' '\n' |cut -d "," -f 5 |grep slug |cut -d\" -f 4); do
curl -k -H "Authorization: Bearer $KEY" $HOST/api/dashboards/db/$dash > dashboards/$dash.json
done
@krishnakanthpps
krishnakanthpps / gist:49815e7aba5490c116ba020da51eddb0
Created May 5, 2017 11:52 — forked from rnorth/gist:2031652
Cookie-based authentication with nginx
worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
@krishnakanthpps
krishnakanthpps / Commands.sh
Created July 16, 2017 12:55 — forked from nrollr/Commands.sh
Install PHP and NGINX on Amazon Linux AMI
## Install NGINX
$ sudo yum install nginx -y
## Install PHP and PHP-FPM
$ sudo yum install php -y
$ sudo yum install php-fpm -y
## Configure NGINX (see below)
$ sudo nano /etc/nginx/conf.d/default.conf
@krishnakanthpps
krishnakanthpps / nginx.default.conf
Created July 16, 2017 12:56 — forked from santoshachari/nginx.default.conf
PHP5.6 and NGINX: Install PHP56-FPM, Nginx & MySQL on EC2 with Amazon Linux AMI
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and php56-FPM
sudo yum install -y nginx php56-fpm
# Install php56 extensions
sudo yum install -y php56-devel php-mysql php56-pdo php56-pear php56-mbstring php56-cli php56-odbc php56-imap php56-gd php56-xml php56-soap