Skip to content

Instantly share code, notes, and snippets.

View nagapavan's full-sized avatar

Pavan Kunisetty nagapavan

  • Bangalore, India
View GitHub Profile
@patik
patik / 1.install.md
Last active October 17, 2017 06:08
Proxy config for Git and Node at DTF

Download and install these first:

  • NodeJS
  • Git for Windows
    • During installation, on the options screen with the check boxes about what to install, check the box for TrueType fonts
    • On the screen with three radio button options about the shell and Windows Command Prompt, choose the second option
    • Go with the default options for the rest of the installation
  • SourceTree
    • This is similar to GitHub's app, but more powerful and flexible
@adamrneary
adamrneary / gulpfile.js
Last active April 14, 2018 13:28
Sample gulpfile for pushing functions to Lambda
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var rename = require('gulp-rename');
var install = require('gulp-install');
var zip = require('gulp-zip');
var AWS = require('aws-sdk');
var fs = require('fs');
var runSequence = require('run-sequence');
@ChimeraCoder
ChimeraCoder / gist:3152820
Created July 20, 2012 19:45
npm (node.js) equivalent of Python's pip freeze?
#Please tell me there is a better way to do this
#(And by 'a better way', I don't mean incorporating the cut within the awk script)
npm ls | grep -E "^(├|└)─" | cut -d" " -f2 | awk '{FS = "@"; print "\""$1"\"", ":", "\""$2"\""}'
@wrwrwr
wrwrwr / lambda.sh
Created February 15, 2017 23:32
Package a Python module with NumPy and SciPy for AWS Lambda.
#!/usr/bin/env bash
# Path to the project directory (that should include requirements.txt),
# Files and directories within that need to be deployed.
project=../backend
contents=(module lamdba_handler.py)
# Unnecessary parts. Note that there are some inter-dependencies in SciPy,
# for example to use scipy.stats you also need scipy.linalg, scipy.integrate,
# scipy.misc, scipy.sparse, and scipy.special.
@baojie
baojie / flask-vs-tornado
Created December 3, 2013 23:42
flask vs tornado benchmark on basic routing and template rendering
Flask, Python 2.7, Single core 271.97 [#/sec] (mean)
Flask, Pypy, Single core 547.11
Flask+Gunicorn, Python, 8Core 1363.06
Flask+Gunicorn, Pypy, 8Core 2701.90
Flask+Gunicorn+Tornado, Python, 8Core 1403.88
Flask+Gunicorn+Tornado, Pypy, 8Core 2582.12
Tornado, Python, Single core 839.65
Tornado, Async, Python, Single core 801.19
Tornado, Pypy, Single core 1841.41
Tornado, Async, Pypy, Single core 1734.37
@egaumer
egaumer / DSL Examples
Last active June 26, 2019 20:21
Some example queries using elastic.js
# simple match all query with term facet
ejs.Request()
.indices("myindex")
.types("mytype")
.query(ejs.MatchAllQuery())
.facet(
ejs.TermsFacet('url')
.field('url')
.size(20))
@miticojo
miticojo / k8s-centralized-logging.yaml
Last active October 21, 2019 09:43
K8S - Centralized logging with ELK and Fluentd (kubernetes >= 1.6)
apiVersion: v1
kind: ServiceAccount
metadata:
name: elasticsearch-logging
namespace: kube-system
labels:
k8s-app: elasticsearch-logging
version: v1
kubernetes.io/cluster-service: "true"
addonmanager.kubernetes.io/mode: Reconcile
@johnmccabe
johnmccabe / INSTALL.md
Created September 27, 2017 09:44
Installing Docker 1.12 on Centos 7
yum -y update
yum -y install yum-utils
yum-config-manager --add-repo https://yum.dockerproject.org/repo/main/centos/7
yum -y update
# yum search --showduplicates docker-engine
yum -y --nogpgcheck install docker-engine-1.12.6-1.el7.centos.x86_64
service docker start
@ryantbrown
ryantbrown / gulp-zip.js
Created March 22, 2015 23:08
Node: Create Zip File with Gulp
var fs = require('fs');
var path = require('path');
var gulp = require('gulp');
var plugins = require('gulp-load-plugins')(); // Load all gulp plugins
// automatically and attach
// them to the `plugins` object
var runSequence = require('run-sequence'); // Temporary solution until gulp 4
// https://github.com/gulpjs/gulp/issues/355
@jxm262
jxm262 / gulp-istanbul-example.js
Last active June 1, 2020 14:26
gulp-istanbul-example
(function () {
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var istanbul = require('gulp-istanbul');
//moved these to functions instead of gulp
function test(cb) {
gulp.src(['test/**/*.js'])
.pipe(istanbul({includeUntested: true})) // Covering files