This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u5-b13/jdk-8u5-linux-x64.rpm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//import org.codehaus.jackson.annotate.{ JsonTypeInfo, JsonSubTypes, JsonProperty } | |
//import org.codehaus.jackson.annotate.JsonSubTypes.Type | |
//import org.codehaus.jackson.map.ObjectMapper | |
import com.fasterxml.jackson.annotation.JsonProperty | |
import com.fasterxml.jackson.annotation.JsonTypeInfo | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.annotation.JsonSubTypes | |
import com.fasterxml.jackson.annotation.JsonSubTypes.Type | |
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.javacodegeeks.java.core; | |
import java.io.BufferedReader; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.Iterator; | |
import org.codehaus.jackson.JsonGenerationException; | |
import org.codehaus.jackson.JsonNode; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package models | |
import scala.collection.JavaConversions.asScalaIterator | |
import com.fasterxml.jackson.annotation.JsonSubTypes | |
import com.fasterxml.jackson.annotation.JsonTypeInfo | |
import com.fasterxml.jackson.databind.JsonNode | |
import com.fasterxml.jackson.databind.ObjectMapper | |
object Processor { | |
val mapper: ObjectMapper = new ObjectMapper(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWS set ulimit for ec2-user | |
sudo su -c "ulimit -n 64000;su - ec2-user" | |
checking open files | |
ls -l /proc/PID/fd | wc -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<style> | |
.chart { | |
margin-left: 42px; | |
} | |
.chart rect { | |
fill: steelblue; | |
stroke: white; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.getCollectionNames().forEach(function(collection) { | |
var indexes = db.getCollection(collection).getIndexes(); | |
indexes.forEach(function(c) { | |
opt = '' | |
ixkey = JSON.stringify(c.key, null, 1).replace(/(\r\n|\n|\r)/gm, "") | |
ns = c.ns.substr(c.ns.indexOf(".") + 1, c.ns.length) | |
for (var key in c) { | |
if (key != 'key' && key != 'ns' && key != 'v') { | |
if (opt != '') { | |
opt += ',' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo '{"id":"TEST","level2":{"id":"Level2 id"}}' | | nc -q0 stats 28777 LOGSTASH JSON | |
nc localhost 5000 < /some/log/file.log | |
echo "local.random.diceroll 4 `date +%s`" | nc -q0 stats 2003 GRAFITE | |
echo "foo:1|c" | nc -u -w0 stats 8125 STATSD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
finding in xml files | |
aws s3 ls --recursive s3://bucket/ | awk '{print $4}' | grep '.xml' | xargs -I@ aws s3 cp s3://bucket/@ - | grep '35160561230314000507550020001107201294779231' | wc -l | |
finding in gzip files!!! | |
s3cmd ls --recursive s3://notafiscal-mailing/ | awk '{print $4}' | grep '.gz' | xargs -I@ s3cmd get @ - | zgrep 'request' | wc -l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
db.collection.aggregate( [ | |
{ $unwind : "$l" }, | |
{ $group : { _id : "$_id", len : { $sum : 1 } } }, | |
{ $sort : { len : -1 } }, | |
{ $limit : 25 } | |
] ) |
OlderNewer