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
for nodejs just copy and run below command | |
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - &&\ | |
sudo apt-get install -y nodejs | |
for nvm | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash | |
then just refresh the bashrc file |
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
axios.get('https://jsonplaceholder.typicode.com/posts?_limit=5') | |
.then(response => { | |
const data = response.data; | |
console.log(data); | |
}) | |
.catch(error => { | |
console.error(error); | |
}); | |
axios.get('https://jsonplaceholder.typicode.com/posts?_limit=5&_sort=title&_order=asc') |
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
version: '3' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.1 | |
container_name: elasticsearch | |
environment: | |
- discovery.type=single-node | |
ports: | |
- 9200:9200 |
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
version: '3' | |
services: | |
elasticsearch1: | |
image: docker.elastic.co/elasticsearch/elasticsearch:8.6.1 | |
container_name: elasticsearch1 | |
environment: | |
- discovery.type=zen | |
- cluster.name=docker-cluster | |
- node.name=node-1 |
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
const { Client } = require('@elastic/elasticsearch'); | |
const fs = require('fs'); | |
const readline = require('readline'); | |
const csv = require('csv-parser'); | |
const client = new Client({ node: 'http://localhost:9200' }); | |
const filePath = '/path/to/large/csv/file'; // Replace with the path to your CSV file | |
const chunkSize = 100000; // Replace with the desired chunk size |
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
put hola/ | |
{ | |
"settings":{ | |
"analysis":{ | |
"analyzer":{ | |
"my-analyzer":{ | |
"tokenizer":"my-tokenizer", | |
"filter":["lowercase"] | |
}, |
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
#uncomment things you want to use and comment that you dont want | |
#Give it A star | |
version: "3" | |
services: | |
#mongodb: | |
#container_name: mongodb | |
#image: mongo:latest | |
#ports: |
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
version: '2.2' | |
services: | |
elasticsearch: | |
image: docker.elastic.co/elasticsearch/elasticsearch:6.6.1 | |
container_name: elasticsearch | |
environment: | |
- cluster.name=docker-cluster | |
- bootstrap.memory_lock=true | |
- "ES_JAVA_OPTS=-Xms512m -Xmx512m" | |
ulimits: |
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
//docker compose up ---->after saving this run this in the same folder --> you can use vs code | |
version: "3.7" | |
services: | |
es01: | |
image: "docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2" | |
ports: | |
- "9200:9200" | |
- "9300:9300" | |
environment: |
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
make sure to go in users_roles and add admins as (user created) | |
./elasticsearch-users useradd kumawatlalit -p kumawat -r network,monitoring |
NewerOlder