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
### Install Oracle Java 8, this means you agree to their binary license!! | |
cd ~ | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections | |
sudo aptitude -y install oracle-java8-installer | |
### Download and Install ElasticSearch |
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/logstash?pretty -d '{ | |
"template": "logstash*", | |
"settings": { | |
"index.refresh_interval": "5s" | |
}, | |
"mappings": { | |
"_default_": { | |
"_all": { | |
"enabled": true, | |
"omit_norms": true |
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
class SalesForceIdValidator { | |
private ID_REGEX = /^[0-9a-zA-Z]{15}([0-9a-zA-Z]{3})?$/; | |
private ID_EXPAND_ARRAY = ['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','0','1','2','3','4','5']; | |
constructor(private id: string) {} | |
public IsValid(): boolean { | |
if (!this.id) { | |
console.warn('[SalesForceIdValidator] id is empty'); | |
return false; |