Skip to content

Instantly share code, notes, and snippets.

@zuketo
zuketo / Twitter.html
Created September 14, 2022 16:26
Twitter.html
<html>
<head>
<title>Twitter on the Blockchain</title>
<!-- RESOURCES -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.26.1/axios.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<script src="https://js.pusher.com/7.2.0/pusher.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/terminal.css@0.7.2/dist/terminal.min.css" />
# Let's see the indices already in ES
GET _cat/indices
# Setup: delete products index in case it exists
DELETE products
# Create product index
PUT /products
{
"settings" : {
@zuketo
zuketo / es-ccr
Last active March 21, 2019 21:14
es-ccr
# Initial Setup
#
# NOTE: SETUP FOR DEMONSTRATION PURPOSES ONLY, NOT FOR PRODUCTION USE
#
# ELASTICSEARCH
#
# 1. Download Elasticsearch 6.6 (and unzip)
# 2. Start two instances of Elasticsearch, each with a different cluster name, port, and data path:
# ./bin/elasticsearch -E cluster.name=cluster1 -E http.port=9200 -E path.data=./cluster1-data
# ./bin/elasticsearch -E cluster.name=cluster2 -E http.port=9201 -E path.data=./cluster2-data