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
var doMapReduce = function(options, callback) { | |
var map = function () { | |
var dateKey = new Date(options.time.getTime()); | |
dateKey.setMinutes(0); | |
dateKey.setSeconds(0); | |
dateKey.setMilliseconds(0); | |
var mapped = { |
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 | |
##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80 | |
## | |
## Debian / Linux / Ubuntu / LSB | |
## Startup script for Express / Node.js application with the forever module | |
## | |
## | |
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin | |
## | |
## |
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 |
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/bash | |
# herein we backup our indexes! this script should run at like 6pm or something, after logstash | |
# rotates to a new ES index and theres no new data coming in to the old one. we grab metadatas, | |
# compress the data files, create a restore script, and push it all up to S3. | |
TODAY=`date +"%Y.%m.%d"` | |
INDEXNAME="logstash-$TODAY" # this had better match the index name in ES | |
INDEXDIR="/usr/local/elasticsearch/data/logstash/nodes/0/indices/" | |
BACKUPCMD="/usr/local/backupTools/s3cmd --config=/usr/local/backupTools/s3cfg put" | |
BACKUPDIR="/mnt/es-backups/" | |
YEARMONTH=`date +"%Y-%m"` |
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
{ | |
"UILayout": { | |
"properties": { | |
"id": { | |
"store": "yes", | |
"type": "long" | |
}, | |
"userId": { | |
"store": "yes", | |
"type": "string" |
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
{"key":"new1","name":"new1","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96592}, | |
{"key":"newE","name":"newE","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96612}, | |
{"key":"newJ","name":"newJ","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96632}, | |
{"key":"newA","name":"newA","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96596}, | |
{"key":"newF","name":"newF","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96616}, | |
{"key":"newK","name":"newK","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96636}, | |
{"key":"newB","name":"newB","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96600}, | |
{"key":"newG","name":"newG","classIdentifier":null,"entityName":null,"layoutType":"static_widget","userId":null,"id":96620}, | |
{"key":"newL","name":"ne |
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 -XPUT 'http://localhost:9200/system/' -d '{ "settings" : { "index" : {"number_of_replicas" : 1 } } }' | |
{ | |
"ok": true, | |
"acknowledged": true | |
} | |
$ curl -XPUT 'http://localhost:9200/system/Layout/_mapping' -d '{"Layout":{"properties":{"name":{"type":"string","index":"analyzed","store":"yes"}}}}' | |
{ |
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
/** ******************************************************* **/ | |
/** * Imports & Utils * **/ | |
/** ******************************************************* **/ | |
var mncore = require("mn-core"); | |
var ConfigManager = mncore.ConfigManager; | |
var confMgr = new ConfigManager(); |
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
18:11:15.336|WARN|failed ContextHandlerCollection@1a15cd9a: java.lang.NoSuchFieldError: IS_SECURITY_ENABLED | |
18:11:15.344|ERROR|Error starting handlers | |
java.lang.NoSuchFieldError: IS_SECURITY_ENABLED | |
at org.apache.jasper.compiler.JspRuntimeContext.<init>(JspRuntimeContext.java:197) ~[jsp-2.1-6.1.14.jar:6.1.14] | |
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:150) ~[jsp-2.1-6.1.14.jar:6.1.14] | |
at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50) [jetty-util-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736) ~[jetty-6.1.26.jar:6.1.26] | |
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140) ~[jetty-6.1.26.jar:6.1.26] |
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
function FooPublic() { | |
this._publicVariable; | |
} | |
FooPublic.prototype.increment = function() { | |
return ++ this._publicVariable; | |
} | |
OlderNewer