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
<?php | |
/** | |
* PHP client for requesting reports from JasperServer via SOAP. | |
* | |
* USAGE: | |
* | |
* $jasper_url = "http://jasper.example.com/jasperserver/services/repository"; | |
* $jasper_username = "jasperadmin"; | |
* $jasper_password = "topsecret"; | |
* |
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
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: redis-server | |
# Required-Start: $syslog | |
# Required-Stop: $syslog | |
# Should-Start: $local_fs | |
# Should-Stop: $local_fs | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: redis-server - Persistent key-value db |
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
# curl -XDELETE http://localhost:9200/test-index | |
# "analyzer"."default" => default name for index and search | |
# "tokenizer" : "standard" => splits words at punctuation characters | |
# http://www.elasticsearch.org/guide/reference/index-modules/analysis/ | |
curl -XPUT http://localhost:9200/test-index/ -d ' | |
{ | |
"index": { | |
"analysis": { |
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
# First do a fresh install of CentOS 5.7 i386, server configuration (no GUI) | |
# This should be performed as root since it's going to be installing a bunch of stuff | |
# --- Update things to make sure we have the latest patches --- | |
# Add EPEL so we can get reasonably recent packages | |
rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm | |
# --- Install all the packages --- # | |
yum -y install python-whisper python-carbon graphite-web python-memcached python-ldap httpd memcached |
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
.DS_Store | |
tmp/ |
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
# ======================================== | |
# Testing n-gram analysis in ElasticSearch | |
# ======================================== | |
curl -X DELETE localhost:9200/ngram_test | |
curl -X PUT localhost:9200/ngram_test -d ' | |
{ | |
"settings" : { | |
"index" : { | |
"analysis" : { |
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
public class CustomColumnSorterFactory implements NativeScriptFactory{ | |
private final static Log LOG = LogFactory.getLog(CustomColumnSorterFactory.class); | |
@Override | |
public ExecutableScript newScript(Map<String, Object> params) { | |
LOG.info("******** Creating new ColumnSortScript."); | |
return new ColumnSortScript(params); | |
} | |
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
<?php | |
require_once "./phpcassa/columnfamily.php"; | |
// Create new ConnectionPool like you normally would | |
$pool = new ConnectionPool("KeyspaceName", array("127.0.0.1")); | |
// Retrieve a raw connection from the ConnectionPool | |
$raw = $pool->get(); |
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
# Reversed or “Real Time” Search in ElasticSearch | |
# ==================================================================================== | |
# You may have come across the term “realtime search” lately | |
# (eg. [here](http://engineering.socialcast.com/2011/05/realtime-search-solr-vs-elasticsearch/)) | |
# and wondered what all the fuss is about. | |
# | |
# Well, the usual workflow with search engines goes like this: | |
# | |
# 1. You index some documents. |
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
# TO_FOLDER=/something | |
# FROM=/your-es-installation | |
DATE=`date +%Y-%m-%d_%H-%M` | |
TO=$TO_FOLDER/$DATE/ | |
echo "rsync from $FROM to $TO" | |
# the first times rsync can take a bit long - do not disable flusing | |
rsync -a $FROM $TO | |
# now disable flushing and do one manual flushing |
OlderNewer