Skip to content

Instantly share code, notes, and snippets.

Mihir Patel eemp

Block or report user

Report or block eemp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View flawed-random-weighted-sampling-with-elasticsearch.sh
#!/bin/bash
SERVER=http://localhost:9200
INDEX=random-samples
MAPPING=docs
CURL_OPTS="-sw '\n'"
ACTIONS_LOG=random-samples-index.log
@eemp
eemp / tmux_local_install.sh
Last active Feb 27, 2017 — forked from ryin/tmux_local_install.sh
bash script for installing tmux without root access
View tmux_local_install.sh
#!/bin/bash
# Script for installing tmux on systems where you don't have root access.
# tmux will be installed in $HOME/local/bin.
# It's assumed that wget and a C/C++ compiler are installed.
# exit on error
set -e
TMUX_VERSION=2.3
View phrase-query-demo-snowball.sh
# start clean - hope you don't have a test index you need!!!
curl -XDELETE localhost:9200/test
curl -XPUT localhost:9200/test
printf "\nCreated a new test index...\n"
curl -XPUT localhost:9200/test/snowball-mapping/_mapping -d '{
"snowball-mapping" : {
"properties" : {
"text" : {
View custom_fasta_proc.pl
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dumper;
die "Usage: $0 FASTA_FILE" if !$ARGV[0];
# read the fasta file
@eemp
eemp / find_arrays.sh
Created Sep 24, 2015
Find Elasticsearch records where a field is an array instead of a simple String
View find_arrays.sh
curl -w "\n" -XDELETE localhost:9200/scrap
curl -w "\n" -XPUT localhost:9200/scrap/ -d '
index :
number_of_replicas : 0
'
curl -w "\n" -XPUT localhost:9200/scrap/script-demo/1?refresh=1 -d '{
"fieldA" : "test string 1"
}'
You can’t perform that action at this time.