This file contains 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
#!/usr/bin/env bash | |
# Formatting constants | |
export BOLD=`tput bold` | |
export UNDERLINE_ON=`tput smul` | |
export UNDERLINE_OFF=`tput rmul` | |
export TEXT_BLACK=`tput setaf 0` | |
export TEXT_RED=`tput setaf 1` | |
export TEXT_GREEN=`tput setaf 2` | |
export TEXT_YELLOW=`tput setaf 3` |
This file contains 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
def command = "git --version" | |
def proc = command.execute() | |
proc.waitFor() | |
println "Process exit code: ${proc.exitValue()}" | |
println "Std Err: ${proc.err.text}" | |
println "Std Out: ${proc.in.text}" |
This file contains 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
git diff --no-prefix | sed -e "s/^diff --git [^[:space:]]*/Index:/" -e "s/^index.*/===================================================================/" --ignore-space-at-eol > changes.patch |
This file contains 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
#!/usr/bin/env bash | |
#usage -> missed_merge to_branch from_branch | |
#example -> missed_merge master r-1.0.1 | |
#the above script gives all commits that are there on r-1.0.1 that have not been merged with master | |
if [ $# -lt 2 ] | |
then | |
echo "ERROR: Incorrect Usage" | |
echo "Usage: missed_merge.sh <to_branch> <from_branch> [<ignore-commits-file-path>]" |
This file contains 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
############################# | |
### SETUP | |
############################ | |
### Delete all indices | |
curl -XDELETE localhost:9200 | |
### Create an index | |
curl -XPOST localhost:9200/books |
This file contains 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
$ ./plugin -url file:{project.dir}/target/releases/custom-http-handler-0.1-SNAPSHOT.zip -install custom-http-handler |
This file contains 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
<?xml version="1.0"?> | |
<assembly> | |
<id>plugin</id> | |
<formats> | |
<format>zip</format> | |
</formats> | |
<includeBaseDirectory>false</includeBaseDirectory> | |
<dependencySets> | |
<dependencySet> | |
<outputDirectory>/</outputDirectory> |
This file contains 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 org.katta.es.http; | |
import org.elasticsearch.client.Client; | |
import org.elasticsearch.common.inject.Inject; | |
import org.elasticsearch.common.settings.Settings; | |
import org.elasticsearch.rest.*; | |
public class RestRegisterAction extends BaseRestHandler { | |
@Inject |
This file contains 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 org.katta.es.plugin.http; | |
import org.katta.es.http.RestRegisterAction; | |
import org.elasticsearch.plugins.AbstractPlugin; | |
import org.elasticsearch.rest.RestModule; | |
public class CustomRestHandlerPlugin extends AbstractPlugin { | |
@Override | |
public String name() { |
This file contains 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
plugin=org.katta.es.plugin.http.CustomRestHandlerPlugin |
NewerOlder