Skip to content

Instantly share code, notes, and snippets.

View mohanmca's full-sized avatar

Mohan Narayanaswamy mohanmca

View GitHub Profile
Always start truning the young generation first.
java -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -verbose:gc -Xloggc:/var/tmp/jvm_gc.log
java -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:PrintHeapAtGc -XX:-PrintTenuringDistribution -XX:-HeapDumpOnOutOfMemoryError -verbose:gc -Xloggc:/var/tmp/jvm_gc.log
Histogram
-XX:-PrintClassHistogram (JMap -histo)
@mohanmca
mohanmca / ElasticSearch
Last active July 11, 2016 08:42
ElasticSearch
ElasticSearch is SchemaFree, Lucene based, Massively scalable, Distributed.
Run as many time as you want. (Multinode)
$> bin/elasticsearch
$> curl -XGET localhost:9200/?pretty
$> curl "http://localhost:9200/_cluster/health?pretty=true"
$> PUT /index/type/id (database/Table/EntityID)
$> curl -XPUT /mysite/node/1 -d
@mohanmca
mohanmca / Todo
Last active August 29, 2015 14:06
http://gallery.mailchimp.com/2956421f3caab54f1e563f370/files/Flexible_Analytics_for_Large_Data_Sets_Using_Elasticsearch.pdf
http://stackoverflow.com/questions/4415511/scala-type-programming-resources
#!/bin/sh
# one way (older scala version will be installed)
# sudo apt-get install scala
#2nd way
sudo apt-get remove scala-library scala
wget http://www.scala-lang.org/files/archive/scala-2.11.2.deb
sudo dpkg -i scala-2.11.2.deb
sudo apt-get update
@mohanmca
mohanmca / MyOwnLesson
Last active August 29, 2015 14:08
Self learned mantra of my own development
TesCase gives confident, and time spent on writing testcase always ended up worthwhile.
Are you stuck? confirm that you read the wiki/document from top-to-bottom, and confirm that you are not trying to jump fence by assuming what is written in wiki
@mohanmca
mohanmca / Day 1.md
Last active August 29, 2015 14:09 — forked from gangstead/Day 1.md

Friday 11/14/14

notes by Steven Gangstead

Rapture Art of One-liner - Jon Pretty @propensive

rapture.io -collection of libraries for scala

jawn json parser. Quicker than Jackson, and I guess Jackson must normally be considered the quickest.

My thoughts: Awesome talk. Look into rapture, looks useful. Jon is smart.

indylambda: Putting invokedynamic to work for Scala

Java 8 introduced lambdas to the Java language. While the design choices differ in many regards from Scala's functions, the underlying mechanics used to represent Java lambdas is flexible enough to be used as a target for the Scala compiler.

Lambdas in Java

Java does not have canonical heirarchy of generic function types (ala scala.FunctionN), but instead allows a lambda to be used as a shorthand for an anonymous implementation of an Functional Interface

Here's an example of creating a predicate that closes over one value:

@mohanmca
mohanmca / clk.tsv
Last active August 29, 2015 14:22 — forked from ceteri/clk.tsv
2014-03-04 15dfb8e6cc4111e3a5bb600308919594 11
2014-03-06 81da510acc4111e387f3600308919594 61