Skip to content

Instantly share code, notes, and snippets.

View mayvazyan's full-sized avatar

Michael Ayvazyan mayvazyan

View GitHub Profile
### 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
@mayvazyan
mayvazyan / logstash
Last active January 13, 2016 04:02 — forked from mivano/logstash
curl -XPUT http://localhost:9200/logstash?pretty -d '{
"template": "logstash*",
"settings": {
"index.refresh_interval": "5s"
},
"mappings": {
"_default_": {
"_all": {
"enabled": true,
"omit_norms": true
@mayvazyan
mayvazyan / sales-force-id-validator.ts
Last active November 5, 2021 15:05 — forked from knation/salesforceId.js
JavaScript Salesforce ID Check & Expansion
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;