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 | |
# Open port iptables only for CentOS 6 | |
iptables -F | |
iptables -A INPUT -p tcp --tcp-flags ALL NONE -j DROP | |
iptables -A INPUT -p tcp ! --syn -m state --state NEW -j DROP | |
iptables -A INPUT -p tcp --tcp-flags ALL ALL -j DROP |
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
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
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
#create a test index with shingle mapping | |
curl -XPUT localhost:9200/test -d '{ | |
"settings":{ | |
"index":{ | |
"analysis":{ | |
"analyzer":{ | |
"analyzer_shingle":{ | |
"tokenizer":"standard", | |
"filter":["standard", "lowercase", "filter_stop", "filter_shingle"] | |
} |
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
LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH | |
export LD_LIBRARY_PATH | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-4.9 g++-4.9 |
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
# Upgrading all packages with pip | |
pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
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
apply plugin: 'java' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'org.mindrot:jbcrypt:0.3m' | |
} |
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
cluster_name: 'DataCollection Cluster' | |
listen_address: 192.168.23.64 | |
rpc_address: 192.168.23.64 | |
native_transport_port: 9042 | |
storage_port: 7000 | |
seed_provider: | |
- class_name: org.apache.cassandra.locator.SimpleSeedProvider | |
parameters: | |
# seeds is actually a comma-delimited list of addresses. |
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
# heap size | |
ES_HEAP_SIZE=30G | |
# max file descriptos | |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/file-descriptors.html | |
# virtual memory | |
# https://www.elastic.co/guide/en/elasticsearch/reference/current/vm-max-map-count.html | |
sysctl -w vm.max_map_count=262144 |
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
create 'g3:edges', {NAME => 'cf', COMPRESSION => 'SNAPPY', BLOCKCACHE => 'true', IN_MEMORY => 'true'}, {SPLITS => ['012', '024', '036', '048', '060', '072', '084', '096', '108', '120', '132', '144', '156', '168', '180', '192', '204', '216', '228', '240', '252'], DURABILITY => 'ASYNC_WAL'} |
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
# list topics | |
kafka-topics.sh --list --zookeeper 192.168.23.64:2181 | |
# describe topic | |
kafka-topics.sh --describe --zookeeper 192.168.23.64:2181 --topic test | |
# create, alter topic | |
kafka-topics.sh --create --zookeeper 192.168.23.64:2181 --topic test --replication-factor 2 --partitions 3 | |
# Read data from a Kafka topic and write it to standard output |
OlderNewer