Skip to content

Instantly share code, notes, and snippets.

@bryanwongbh
bryanwongbh / elasticsearch-lock-only
Created January 24, 2019 08:22
Elasticsearch Remove Lock Read-Only Mode
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'
@bryanwongbh
bryanwongbh / pdfParser.js
Created February 25, 2019 00:02
PDF Parse
fs = require('fs');
var PDFParser = require("pdf2json/pdfParser");
var pdfParser = new PDFParser(this,1);
pdfParser.on("pdfParser_dataError", errData => console.error(errData.parserError) );
pdfParser.on("pdfParser_dataReady", pdfData => {
console.log("Raw - ");
console.log(pdfParser.getRawTextContent());