Skip to content

Instantly share code, notes, and snippets.

@patrick-fitzgerald
patrick-fitzgerald / start.ini
Created October 25, 2010 05:47
Jetty start.ini
#===========================================================
# Jetty start.jar arguments
# Each line of this file is prepended to the command line
# arguments # of a call to:
# java -jar start.jar [arg...]
#===========================================================
#===========================================================
# Contributor: [Vitaliy Berdinskikh](mailto:ur6lad@archlinux.org.ua) aka UR6LAD
# Contributor: Leif Warner <abimelech@gmail.com>
_timestamp=v20111024
pkgname=jetty
pkgver=8.0.4
pkgrel=1
pkgdesc="A full-fledged production-grade lightweight Java Servlet Container"
arch=('i686' 'x86_64')
url="http://jetty.codehaus.org/jetty/"
license=('Apache' 'EPL')
@RichardDavies
RichardDavies / feed2js.js
Created October 11, 2011 17:46
Alternate JavaScript implementation of Feed2JS using the Google Feed API
/**
* Feed2JS using the Google Feed API
*
* Inspired by Feed2JS (http://feed2js.org)
*
* Author: Richard Davies (http://www.richarddavies.us)
*
* Example Usage:
* <!-- Requires the Google Loader and API key from http://code.google.com/apis/loader/signup.html -->
* <script src="https://www.google.com/jsapi?key=YOUR_KEY_HERE"></script>
@tdeckers-cisco
tdeckers-cisco / jetty-ondemand.sh
Created November 30, 2012 09:56
Jetty On-demand - bash bootstrap
#!/usr/bin/env bash
#
# Invoke this bootstrap copying following command to the command line:
#
# bash < <(curl -s -L https://raw.github.com/gist/4174871/jetty-ondemand.sh)
#
# (this should be run as root)
#
# move to working dir.
#!/bin/bash
INSTALL_ROOT="/opt"
INSTALL_FOLDER="$INSTALL_ROOT/elasticsearch"
echo "Installing OpenJDK 1.7.0 ..."
sudo yum install -y java-1.7.0-openjdk
echo "[Installing ElasticSearch...]"
cd ~
@torbenbr
torbenbr / es.sh
Last active December 18, 2015 13:49
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.2.deb
sudo dpkg -i elasticsearch-1.5.2.deb
sudo service elasticsearch start
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.io.*;
import org.apache.hadoop.mapreduce.Mapper;
public class SolrMapper extends Mapper<LongWritable, Text, Text, Text> {
private HttpSolrServer solrServer;
private Text outKey = new Text();
@Override
.level = INFO
handlers = java.util.logging.FileHandler,java.util.logging.ConsoleHandler
java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.FileHandler.pattern = ./logs/solr%u.log
#!/bin/sh
# set the configuration variables below, before running the script
# get the solr nightly build download link from https://builds.apache.org/job/Solr-Artifacts-4.x/lastSuccessfulBuild/artifact/solr/package/
JETTY_URL="http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-9.0.6.v20130930.tar.gz&r=1"
JETTY_HOME="/opt/jetty"
JAVA='/usr/bin/java'
JETTY_PORT=8983
JETTY_HOST=127.0.0.1
@lukas-vlcek
lukas-vlcek / gist:6972064
Last active December 25, 2015 11:49
Testing search time analyzer. This works as well now.
#!/bin/sh
echo "Elasticsearch version and build:"
curl localhost:9200; echo; echo;
echo "Delete index"
curl -X DELETE 'localhost:9200/i'; echo; echo;
echo "Create index with analysis and mappings"
curl -X PUT 'localhost:9200/i' -d '{