This file contains hidden or 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
| { | |
| "settings" : { | |
| "index" : { | |
| "analysis" : { | |
| "analyzer" : { | |
| "unigram" : { | |
| "tokenizer" : "unigram_tokenizer" | |
| }, | |
| "bigram" : { | |
| "tokenizer" : "bigram_tokenizer" |
This file contains hidden or 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 com.yoslab.process.writer; | |
| import java.util.List; | |
| import org.elasticsearch.action.bulk.BulkRequestBuilder; | |
| import org.elasticsearch.action.bulk.BulkResponse; | |
| import org.elasticsearch.client.Client; | |
| import org.elasticsearch.client.transport.TransportClient; | |
| import org.elasticsearch.common.transport.InetSocketTransportAddress; |
This file contains hidden or 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
| apply plugin: "java" | |
| apply plugin: "eclipse" | |
| compileJava.options.encoding = "UTF-8" | |
| //version = '0.1-SNAPSHOT' | |
| repositories { | |
| mavenCentral() | |
| } |
This file contains hidden or 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 -ex | |
| exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
| perl -pi -e 's/^#?Port 22$/Port 22\nPort 443/' /etc/ssh/sshd_config | |
| semanage port -m -t ssh_port_t -p tcp 443 | |
| iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT | |
| iptables -D INPUT -j REJECT --reject-with icmp-host-prohibited | |
| iptables -A INPUT -j REJECT --reject-with icmp-host-prohibited | |
| service iptables save | |
| service iptables restart | |
| service sshd restart |
This file contains hidden or 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 -ex | |
| exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1 | |
| perl -pi -e 's/^#?Port 22$/Port 22\nPort 443/' /etc/ssh/sshd_config | |
| /etc/init.d/ssh stop | |
| /etc/init.d/ssh start |
This file contains hidden or 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 python | |
| # coding: utf-8 | |
| # jubatus server info. | |
| host = 'localhost' | |
| port = 9199 | |
| import sys | |
| import json | |
| import random |
This file contains hidden or 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
| { | |
| "template" : "logstash-*", | |
| "mappings": { | |
| "solr_log": { | |
| "properties": { | |
| "@log_name": { | |
| "type": "string", | |
| "index" : "not_analyzed" | |
| }, | |
| "@timestamp": { |
This file contains hidden or 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 com.yoslab.process.writer; | |
| import java.io.BufferedWriter; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.OutputStreamWriter; | |
| import java.io.PrintWriter; | |
| import java.net.URISyntaxException; | |
| import java.util.ArrayList; |
This file contains hidden or 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 python | |
| # -*- coding: utf-8 -*- | |
| import boto | |
| import sys | |
| import csv | |
| """ | |
| Import CSV data to your DynamoDB. | |
| usage : importCSV2DDB.py -f <csv filepath> |
This file contains hidden or 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 -ex | |
| # run only on MASTER node. | |
| if grep -Fq "\"isMaster\": true" /mnt/var/lib/info/instance.json ; then | |
| # open the ssh port... | |
| perl -pi -e 's/^#?Port 22$/Port 22\nPort 443/' /etc/ssh/sshd_config | |
| /etc/init.d/sshd restart | |
| # install scala and sbt. |
OlderNewer