Skip to content

Instantly share code, notes, and snippets.

View debraj-manna's full-sized avatar

Debraj Manna debraj-manna

  • Spotnana
  • Bengaluru
View GitHub Profile
@debraj-manna
debraj-manna / PrioritySend.java
Last active November 22, 2015 11:34
Priority Queue in RabbitMq which sends message with priority and having type "HELLO"
package helloWorld;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import com.rabbitmq.client.AMQP;
import com.rabbitmq.client.BasicProperties;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.Connection;
@debraj-manna
debraj-manna / XDebugInPhpStorm.md
Last active November 7, 2015 17:20
Setting up Xdebug with PhpStorm 6 on Ubuntu 12.04 LTS

Setting Up Xdebug with PhpStorm 6 on Ubuntu 12.04 LTS

Pre-requisites

  1. Php >= 5.4 is already installed.
  2. Java 7 or greater is installed.
  3. PhpStorm 6 is installed
  4. Download PhpStorm 6.0.3 from here
  5. Uzip the downloaded file.
  6. Navigate to bin directory and execute ./phpstorm.sh. (Give execute permission to phpstorm.sh if it is not already there)
curl http://localhost:8983/solr/discovery/update --data '<delete><query>*:*</query></delete>' -H 'Content-type:text/xml; charset=utf-8'
curl http://localhost:8983/solr/discovery/update --data '<commit/>' -H 'Content-type:text/xml; charset=utf-8'
@debraj-manna
debraj-manna / curl
Last active August 29, 2015 14:27 — forked from stonith/curl
logstash elasticsearch template - disable _all field, enable simple analyzer, set default query field to @message
curl -XPUT localhost:9200/_template/logstash -d '
{
"template" : "logs-*",
"settings" : {
"index.analysis.analyzer.default.type": "simple",
"index.cache.field.type": "soft",
"index.compress.stored": true,
"index.merge.policy.max_merged_segment": "5g",
"index.query.default_field": "@message",
"index.refresh_interval": "5s",